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)
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 had to fix the local jet speed but it works ty
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)
Please say [SOLVED] or something in the title
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
use what i provided and mark it as solved. it's the most efficient way