How to remove KM/H from number

This is a script in server script service.
KMH is the speed of the car, but when it print(“KMH”) it would print the speed of the car and KM/H how can I remove the KM/H and it only printing the speed?

game.ReplicatedStorage.con.OnServerEvent:Connect(function(player, KMH)

	task.wait()
	print(KMH)

What it prints:
Screen Shot 2023-10-12 at 7.24.53 AM
How do I remove the KM/H piece?

game.ReplicatedStorage.con.OnServerEvent:Connect(function(player, KMH)

	task.wait()
	print(tonumber(string.match(KMH, "%d+")))
1 Like

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