For the past few days I have been trying to find a way to prevent a car from spazzing while driving it.
I have taken the jeep model from the toolbox (which is also findable in the default game template “Suburban” in Roblox Studio) and I have tested this vehicle on different devices and I stumbled across a problem which can cause serious issues to players with lower-end devices.
On my computer the car drives perfectly fine. However, on lower-end devices, the car tends to become unpredictable and undriveable; it begins spazzing around.
I think this is happening because some lower-end devices can’t handle the calculations the script is trying to perform each renderstepped:wait() which in time causes lag and miscalculations causing the car to become undriveable.
To simulate this problem I’ve added a serverscript in workspace:
while true do
wait()
print("test")
end
The longer this script runs, the higher the ping and the more the vehicle becomes unpredictable.
Looking at the performance of the scripts used in the vehicle (a localscript and serverscript), you can see that there are no remarkable findings. The rate and activity are in between 0 and 2%, which should be fine.
It seems that I’m right to assume that the more lag the server has, the worse the driving gets.
Is there a way to prevent this car from spazzing whenever the server or client can’t handle the calculation?
Video of the car spazzing out:
robloxapp-20201216-1906340.wmv (2.7 MB)
link to the model in toolbox:
https://www.roblox.com/library/290307816/Jeep