Can’t you just anchor it? 30char
Body movers don’t work with anchored parts.
If i anchor it BodyVelocity won’t work.
BodyGyro, still players would be able to slow it down by standing in front of it. (Also it works only on Y axis)
Oh, so even if you anchor it, it still won’t work?
Do you want the player to be able to turn left and right and be able to drive the scooter?
Nope, as i said it’s only for tram driving system. However i need it to go up hills and turn in rails.
Try adding a while loop and setting the orientation to the orientation that you want and make sure to have an if statement checking if the tram is going up a hill.
I don’t think this is a good solution just for performance issues.
Something like this:
local goingUpHill = false
while true do
wait()
if not goingUpHill then
script.Parent.Orientation = Vector3.new(0,0,0)
end
end
Will there be a lot of trams in the game?
Please use Heartbeat:Wait(), wait() is bad.
What about this?
local goingUpHill = false
script.Parent:GetPropertyChangedSignal('Orientation'):Connect(function()
if not goingUpHill then
script.Parent.Orientation = Vector3.new(0,0,0)
end
end)
Up to 24 players + in singleplayer there will be simple AI trains. (Almost finished scripting them, body velocity is last thing)
Still players are able to slow it down by standing in front of it and glitch it out of the tracks (even with this script)
Why not just crank up the max power so it is really hard to slow down?
Tried that, it just yeets the tram out of the map.
Then use a bodyposition and a bodygyro, I think it should work.
I tested out a part with body velocity, and I couldn’t slow down the part significantly. I don’t think trams slowing down should be a concern.
That kinda works, however players can still block it by standing in front of it.