Skip to content
TheChatArchiveThe Chat Archive
Qwenqwen-max-2025-01-25· Alibaba (Qwen)Hugging 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 o4-mini-2025-04-16’s answer.
  1. User

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

  2. Qwen Assistant

    Certainly! Below is a simple and functional Conveyor Script for Roblox Studio. This script will make objects placed on a conveyor belt move in a specific direction at a constant speed.


    Conveyor Script

    -- Conveyor Script for Roblox Studio
    
    -- Variables
    local conveyor = script.Parent -- The part that acts as the conveyor belt
    local speed = 5 -- Speed of the conveyor (you can adjust this value)
    local direction = Vector3.new(1, 0, 0) -- Direction of movement (X-axis by default)
    
    -- Function to move objects
    local function moveObject(part)
        -- Ensure the part is not anchored
        if part.Anchored then
            return
        end
    
        -- Apply velocity to the part
        local bodyVelocity = Instance.new("BodyVelocity")
        bodyVelocity.Velocity = direction.Unit * speed
        bodyVelocity.MaxForce = Vector3.new(5000, 5000, 5000) -- Adjust max force if needed
        bodyVelocity.Parent = part
    
        -- Clean up when the part is no longer on the conveyor
        part.Touched:Connect(function()
            -- Check if the part is still on the conveyor
            if not part:IsDescendantOf(conveyor) then
                bodyVelocity:Destroy()
            end
        end)
    end
    
    -- Detect when an object touches the conveyor
    conveyor.Touched:Connect(function(hit)
        -- Check if the object is a BasePart
        if hit:IsA("BasePart") then
            moveObject(hit)
        end
    end)
    

    How It Works

    1. Variables:

      • conveyor: The part where the script is placed, acting as the conveyor belt.
      • speed: Determines how fast objects move on the conveyor.
      • direction: A Vector3 that defines the direction of movement. By default, it moves along the X-axis (Vector3.new(1, 0, 0)). You can change this to any direction you need.
    2. Functionality:

      • When an object touches the conveyor, the Touched event is triggered.
      • The script checks if the touched object is a BasePart. If so, it applies a BodyVelocity to the object to move it in the specified direction.
      • The BodyVelocity is destroyed when the object leaves the conveyor.
    3. Customization:

      • You can adjust the speed variable to make the conveyor faster or slower.
      • Change the direction vector to control the movement direction (e.g., Vector3.new(0, 0, 1) for Z-axis movement).

    Setup Instructions

    1. Create a new part in Roblox Studio and name it something like "Conveyor".
    2. Insert a Script into the conveyor part.
    3. Copy and paste the above script into the script.
    4. Test the game by placing objects on the conveyor. They should move in the specified direction.

    Optional Enhancements

    • Visual Feedback: Add textures or decals to the conveyor part to make it look like a real conveyor belt.
    • Dynamic Speed: Use a NumberValue or a GUI slider to allow players to adjust the conveyor speed dynamically.
    • Direction Switching: Add a mechanism (e.g., a button or lever) to reverse the conveyor's direction.

    Let me know if you need further assistance or additional features!

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