Train KM/H Issue

image

The UI at above one. I tried to find how to calculate train speed and post to Vehicles Seat UI. But it too lack of information and can’t find it. Does anybody have any good idea?

Please tell me if you have script.

local VehicleSeat = workspace.VehicleSeat

while task.wait() do
	script.Parent.Text = VehicleSeat.AssemblyLinearVelocity.Magnitude
end

image
How to make like only 33
is there any way for that?

math.floor(number) will return the highest whole number that is equal to or lesser than the provided number.

1 Like

use math.floor(number) just to remove the decimal places or math.round(number) to round

1 Like

Thank you so much! It helps me alot.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.