Help with cooldowns for block attack
this happens.
elseif inp.KeyCode == Enum.KeyCode.V and DB == false and BlockDB == false then
print("pressed for block")
DB = true
BlockDB = true
rem:FireServer(nil,"Block")
end
end)
uis.InputEnded:Connect(function(inp,pro)
if pro then return end
if inp.KeyCode == Enum.KeyCode.V and DB == true and BlockDB == true then
print("pressed for unblock")
wait(0.2)
rem:FireServer(nil,"Block")
DB = false
BlockDB = false
end
end)
if inp.KeyCode == Enum.KeyCode.V and DB == true and BlockDB == true then
print("pressed for unblock")
rem:FireServer(nil,"Block")
wait(0.2)
DB = false
BlockDB = false
You put the remote event after the 0.2 wait
Maybe it helps not sure, i dont have much info to work around with
elseif mode == "Block" then
if Blocking == false and BlockDB == false and DB == false then
BlockDB = true
DB = true
Blocking = true
Block(char)
elseif Blocking == true and BlockDB == true and DB == true then
BlockDB = false
DB = false
Blocking = false
wait(0.2)
UnBlock(char)
end
end
So the problem is the cool down is only for firing the remote, it has nothing to do with the animation or any of that. so try creating a bool instance and resetting the cool down on the other script after the animation finishes. you probably have to put a wait after the animation for however long it goes for.