RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Create an Ultra Realistic Train Driving system"
-- server script local train = game.Workspace.Train local trainSpeed = 0 local function onTrainThrottleChange(player, throttle) if throttle > 0 then trainSpeed = throttle * 10 else trainSpeed = 0 end end game.Players.PlayerAdded:Connect(function(player) player.TrainThrottleChanged:Connect(onTrainThrottleChange) end) while true do train.PrimaryPart.Velocity = train.PrimaryPart.CFrame.lookVector * trainSpeed wait(0.1) end