val.RPM.Changed:connect(function()Guages.RPM.Text=tostring(math.floor(val.RPM.Value))local P=tostring(math.ceil(math.max(((val.RPM.Value-BeginRPM)/(MaxRPM-BeginRPM))*15,0)))print(P)Guages.RPM_LIGHTS[P].Visible=true for G=1,15,1 do if tonumber(Guages.RPM_LIGHTS[G].Name)>tonumber(P)then Guages.RPM_LIGHTS[G].Visible=false end end end)

val.RPM.Changed:connect(function()
	
	Guages.RPM.Text = tostring(math.floor(val.RPM.Value))
	
	--Updates the RPM Lights	
	local LightFraction = tostring(math.ceil(math.max(((val.RPM.Value - BeginRPM) / (MaxRPM - BeginRPM)) * 15,0)))
	
	print(LightFraction)
	
	Guages.RPM_LIGHTS[LightFraction].Visible = true
	
	for i = 1,15 do
		
		if tonumber(Guages.RPM_LIGHTS[i].Name) > tonumber(LightFraction)then
			
			Guages.RPM_LIGHTS[i].Visible = false
			
		end
		
	end
	
	
end)
