Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Speedometer Speed Display For Cars?

Asked by 9 years ago

How would you make your screen gui or surface gui show your cars speed, example, The text says Speed: (This is where the speed goes). Say your going 45 sps (Speeds Per Second) or 45 KMH or 45 MPH, or just 45, how would you get your text to change to your cars speed through a script.

1 answer

Log in to vote
0
Answered by
unmiss 337 Moderation Voter
9 years ago

This is easily determined by the vehicleseat's velocity.

For example:

local speed
local driverseat = "driverseat directory"

driverseat.Changed:connect(function()
    speed = math.floor(driverseat.Velocity.Magnitude)/2 -- Divide it by two to get "studs per second"
end)
Ad

Answer this question