Skip to content
TheChatArchiveThe Chat Archive
o4-mini-2025-04-16· OpenAIHugging Face LMArena Human Preference 140K

Could you please, make me a Conveyer Script for Roblox Studio

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Qwenqwen-max-2025-01-25’s answer.
  1. User

    Could you please, make me a Conveyer Script for Roblox Studio

  2. Assistant

    Here’s a simple “conveyor‐belt” script you can drop into a Part in Roblox Studio. Any unanchored BasePart that touches this conveyor will be carried along its look-vector at whatever speed you choose.

    Setup Steps

    1. In Explorer, create a Part (e.g. name it “Conveyor”).
    2. Size/rotate it so its Front face (the red axis) is the direction you want parts to move.
    3. Inside that Part, insert a Script and paste in the code below.
    4. Tweak the SPEED constant to dial in your belt’s speed (studs/sec).
    -- Conveyor Script (place inside your conveyor Part)
    
    local conveyor    = script.Parent
    local SPEED       = 50        -- studs per second
    local DIRECTION   = conveyor.CFrame.LookVector
    local MAX_FORCE   = 1e5       -- how strongly parts will be driven
    
    -- Keep track of BodyVelocity instances so we can clean them up
    local bvMap = {}
    
    -- When something starts touching the conveyor:
    conveyor.Touched:Connect(function(hit)
        -- only move non-anchored BaseParts (ignore terrain, players, models, etc.)
        if not hit:IsA("BasePart") or hit.Anchored then
            return
        end
        -- avoid double-adding
        if bvMap[hit] then
            return
        end
    
        -- create a BodyVelocity to push the part
        local bv = Instance.new("BodyVelocity")
        bv.MaxForce    = Vector3.new(MAX_FORCE, MAX_FORCE, MAX_FORCE)
        bv.Velocity    = DIRECTION * SPEED
        bv.P        arent     = hit
    
        -- store for cleanup when the part leaves the conveyor
        bvMap[hit] = bv
    end)
    
    -- When something stops touching:
    conveyor.TouchEnded:Connect(function(hit)
        local bv = bvMap[hit]
        if bv then
            bv:Destroy()
            bvMap[hit] = nil
        end
    end)
    

    How it works:

    • Touched → if an unanchored part enters, we give it a BodyVelocity pointing along the conveyor’s look-vector.
    • TouchEnded → once it leaves, we destroy that BodyVelocity so normal physics resume.

    🎨 Customizations

    • To reverse direction, either rotate your conveyor Part 180° or flip the code to use -conveyor.CFrame.LookVector.
    • If you want to move only specific parts/models (e.g. only players’ characters), add a CollectionService tag or name-check inside the Touched callback.
    • You can also swap BodyVelocity for LinearVelocity (newer API) if you prefer.

    Enjoy building your factory! 🚂🛠️

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.