If songsEnabled is false then the speed Gui that’s connected to the events DriverSeated and DriverUnSeated works fine, but if it’s true then it sometimes goes up to 2 studs per second and after that no matter what I do it doesn’t go above 0.
The other bug is that when I get off the seat it simply stops the song and plays another one.
Here are the functions I’m calling outside of the block above:
The first bug is fairly perplexing. Could you share the local script that you have connected to the script?
The second bug is because you’ve connected the script controlling songs to the vehicleSeat:GetPropertyChangedSignal(“Occupant”) meaning it will fire every time that property changes.
Could you also take a screenshot or video of the issue so that I can properly visualise what’s happening?
Sure, meanwhile I actually managed to fix the songs continuing to play and realized that small of a mistake, but the velocity is still a problem. Here’s the script:
Are you able to move with songsEnabled = true, or is it just the GUI that doesn’t work? Could you put a print in the local script, in the part which controls the speedometer, and also one in the songEnabled part of the server script?
I fixed the bug a few minutes ago and the problem was that it detected the wrong boat. Also I realized that event listeners on the client only need the player so they can know where to execute, but it isn’t in the arguments, so I sent the seat object to the client and tracked it’s speed.