Scripting an infinite running train

Ok ive been wondering how to script a train that runs endless just like that old roblox game Train Wars when players spawn on a endless running train in a desert.

1 Like

Instead of moving the train, move the land around it to make it (the train) seem like its moving. You can then delete the land once it gets far enough from the train and randomly produce more land in front of the train.

1 Like

How would I go about doing that?

I made a quick little Roblox place example:
Moving Thing.rbxl (77.2 KB)

Although its not polished it has the basics put into it. The main (and only) script is in workspace.MoveScript:

local tweenService = game:GetService("TweenService")

local baseplate = workspace.Baseplate

local startPosition = baseplate.Position

function move()
	baseplate.Position = startPosition
	local tween = tweenService:Create(baseplate,, Enum.EasingStyle.Linear), {Position =,-10,baseplate.Size.Z/2 - 10)})


and tweens the baseplate indefinitely.

If you were to add more flora you would have to tween that too.
I also added a little bit of anchored velocity on the baseplate so you would move away from the car if you jumped out.

Good luck and hope this guides you well.