this is the script
local jetspeed = game.StarterGui.ScreenGui.StartJetBoots.wait function clicked() jetspeed.Value = jetspeed.Value - 0.1 end script.Parent.MouseButton1Down:Connect(clicked)
local jetspeed = game.Players.LocalPlayer.PlayerGui:WaitForChild('StartJetBoots'):WaitForChild('wait') local min = 0 local max = math.huge script.Parent.MouseButton1Down:Connect(function() jetspeed.Value = math.clamp(jetspeed.Value - 0.1, min, max) end)
math.clamp doesn't allow a number to go under min, and doesnt allow the number to go over max. math.huge is infinite
i organized your script a little bit to prevent errors
i fixed the script nvm
its here if u need it too though
local jetspeed = game.StarterGui.ScreenGui.StartJetBoots.wait function clicked() jetspeed.Value = jetspeed.Value - 0.1 if jetspeed.Value < 0 then jetspeed.Value = 0 end end script.Parent.MouseButton1Down:Connect(clicked)