Hello, i’m working on my game and currently working on driving system (using scooter because i don’t have tram model ready).
Everything works fine however players are able to push the vehicles:
Thanks!
Hello, i’m working on my game and currently working on driving system (using scooter because i don’t have tram model ready).
Everything works fine however players are able to push the vehicles:
Thanks!
Can we see your script so we can fix it? I would recommend using a bodygyro.
Thanks for answer,
Try changing the bodygyro settings and it should work.
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?