this is the script
1 | local jetspeed = game.StarterGui.ScreenGui.StartJetBoots.wait |
2 |
3 | function clicked() |
4 | jetspeed.Value = jetspeed.Value - 0.1 |
5 | end |
6 |
7 | script.Parent.MouseButton 1 Down:Connect(clicked) |
1 | local jetspeed = game.Players.LocalPlayer.PlayerGui:WaitForChild( 'StartJetBoots' ):WaitForChild( 'wait' ) |
2 | local min = 0 |
3 | local max = math.huge |
4 |
5 |
6 | script.Parent.MouseButton 1 Down:Connect( function () |
7 | jetspeed.Value = math.clamp(jetspeed.Value - 0.1 , min, max) |
8 | 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
01 | local jetspeed = game.StarterGui.ScreenGui.StartJetBoots.wait |
02 |
03 | function clicked() |
04 | jetspeed.Value = jetspeed.Value - 0.1 |
05 | if jetspeed.Value < 0 then |
06 | jetspeed.Value = 0 |
07 | end |
08 | end |
09 |
10 | script.Parent.MouseButton 1 Down:Connect(clicked) |