I’m trying to make the bar deplete and end at zero but it just goes into the negatives.
Heres my script:
local hyperActivate = game:GetService("ReplicatedStorage"):WaitForChild("HyperActivate")
local evasiveActivate = game:GetService("ReplicatedStorage"):WaitForChild("EvasiveActivate")
hyperActivate.OnServerEvent:Connect(function(plr)
plr:FindFirstChild("Hyper"):FindFirstChild("HyperActive").Value = true
while wait(.01) do
repeat task.wait(1)
plr:FindFirstChild("Hyper").Value -= 1
until plr:FindFirstChild("Hyper").Value == 0
end
plr:FindFirstChild("Hyper"):FindFirstChild("HyperActive").Value = false
end)