--	inspd.Rotation = -115 + (220 / 220) * (math.abs(script.Parent.Parent.Values.Velocity.Value.Magnitude*((10/12) * (60/88))))

end)

script.Parent.Speed.MouseButton1Click:connect(function()
	if currentUnits==#UNITS then
		currentUnits = 1
	else
		currentUnits = currentUnits+1
	end
	for i,v in pairs(script.Parent.Speedo:GetChildren()) do
		v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns"
	end
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

mouse.KeyDown:connect(function(key)
	if key=="v" then
		script.Parent.Visible=not script.Parent.Visible
	end
end)

while wait() do
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then 
		gearText = "N"
		car.Body.Dash.Gear.G.Gear.Text = "N"
	elseif gearText == -1 then
		gearText = "R"
		car.Body.Dash.Gear.G.Gear.Text = "R"
	elseif gearText >= 1 then
		if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then
			gearText = "D"
		end
	end
	script.Parent.Gear.Text = gearText
	car.Body.Dash.Gear.G.Gear.Text = gearText
end
