Trying to make a spring bar
while true do
wait()
if script.Parent.Sprinting == true then
wait(1)
game.Players.LocalPlayer.PlayerGui.UI.Sprint.SprintBar.Size -= UDim2.new(0.05,0,0,0)
end
end
Trying to make a spring bar
while true do
wait()
if script.Parent.Sprinting == true then
wait(1)
game.Players.LocalPlayer.PlayerGui.UI.Sprint.SprintBar.Size -= UDim2.new(0.05,0,0,0)
end
end
Any errors?
No no errors jdfsnsjifdsajkfdsajkfhdsjkfhsdjkfhdjkafhjdka
Inside the UDim just place a variable for what you want to change:
So instead of 0.05 you just put in Value… then define Value up above within that function and change this to subtract instead.
Am i making sense?
Edit: like this:
while true do
wait()
if script.Parent.Sprinting == true then
wait(1)
Value = Value - 0.05
game.Players.LocalPlayer.PlayerGui.UI.Sprint.SprintBar.Size = UDim2.new(Value,0,0,0)
end
end
I don’t entirely understand the issue.
Is it growing instead of getting smaller?
Testing the script you have now, doesn’t work at all for me
At script.Parent.Sprinting
add Sprinting.Value
ex:
while true do
wait()
if script.Parent.Sprinting.Value == true then
wait(1)
game.Players.LocalPlayer.PlayerGui.UI.Sprint.SprintBar.Size -= UDim2.new(0.05,0,0,0)
end
end
I am certified officialy stupid.
Took me a bit to solve it, before I had thought it was a size issue lol
You aren’t stupid, many people make mistakes (if you don’t make at least 1 mistake programming, you’re a god)