i have made a script that adds an attribute called NoJump to the player with a remove event, and another script that sets the jump power to 0 when the attribute exists, and it works, but if the no jump is called multiple times in a short amount of time, it gets deleted after 2 seconds ( only remote not remote2 ), how would i make it so it resets the cooldown every time the event is fired (im trying to achieve no jump in combat combo)
here is the script for the attribute
local remote = game.ReplicatedStorage.Events:WaitForChild("Combat")
local remote2 = game.ReplicatedStorage.Events:WaitForChild("downslam")
remote.OnServerEvent:Connect(function(plr)
local char = plr.Character
char:SetAttribute("NoJump", true)
wait(2)
char:SetAttribute("NoJump", nil)
end)
remote2.OnServerEvent:Connect(function(plr)
local char = plr.Character
char:SetAttribute("NoJump", true)
wait(2.5)
char:SetAttribute("NoJump", nil)
end)