Hello, I am making a racing game with a friend and we are using built in VehicleSeats. I want to make a custom gui to show how fast the player is going, like this: https://imgur.com/h17r8RH
I can't figure out how to make the gui show and hide when you enter and exit the seat. I also can't figure out how to update the speed, since it dosen't look like VehicleSeats have a CurrentSpeed property or something like that. Here is my current code:
local Occupant = script.Parent.Occupant
Occupant.Changed:Connect(function()
if Occupant then
Occupant.PlayerGui.RaceGUI.Enabled = true
else
Occupant.PlayerGui.RaceGUI.Enabled = false
end
end)
I get this error:
Workspace.fatTire.driverSeat.gui:3: attempt to index local 'Occupant' (a nil value)
Thanks!!

1 comment
If this doesn't work, tell me.