RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Create an advanced automatic train system with the LinearVelocity constraint"
-- server script local train = game.Workspace.Train local speed = 10 train:SetPrimaryPartCFrame(CFrame.new(0, 0, 0)) for _, part in pairs(train:GetChildren()) do if part:IsA("BasePart") then local lv = Instance.new("BodyVelocity") lv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) lv.Velocity = Vector3.new(0, 0, speed) lv.Parent = part end end