Here is the first move script.
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local debounce = false
script.Parent.MouseButton1Click:Connect(function()
if Character.HumanoidRootPart.Anchored == false then
if debounce == false then
debounce = true
if Player.leaderstats.Nature.Value == "Fire" then
game.ReplicatedStorage.FireWall:FireServer()
elseif Player.leaderstats.Nature.Value == "Grass" then
game.ReplicatedStorage.GWall2:FireServer()
elseif Player.leaderstats.Nature.Value == "Water" then
game.ReplicatedStorage.WaWalk2:FireServer()
wait(9)
debounce = false
end
end
end
end)
Even after waiting for the 9 seconds, I cant use the move or any other moves from this script.
Here is the second script
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local debounce = false
script.Parent.MouseButton1Click:Connect(function()
if Character.HumanoidRootPart.Anchored == false then
if not debounce then
debounce = true
if Player.leaderstats.Nature.Value == "Fire" then
game.ReplicatedStorage.ShootFireBall:FireServer()
elseif Player.leaderstats.Nature.Value == "Grass" then
game.ReplicatedStorage.ShootGrassBall:FireServer()
elseif Player.leaderstats.Nature.Value == "Water" then
game.ReplicatedStorage.ShootWaterBall:FireServer()
wait(3)
debounce = false
end
end
end
end)
I dont know why, but its the same thing with this script. After using this move, the cooldown timer never goes back to false.
