I am new to scripting and i am trying to build a train and use a tactic for velocity to make it move. I made this code:
local clickDetector = workspace.Red.ClickDetector function onMouseClick() game.Workspace.track_boy.Velocity = Vector3.new(-25,0,0) game.Workspace.track_man.Velocity = Vector3.new(-25,0,0) end game.clickDetector.MouseClick:connect(onMouseClick)
But it doesn't work.. Can someone tell me what's the problem or should i try something else?