Hello people, I am making a combat game and I want to make some moves cancellable before they can hit and do damage. I’ve already implemented this, but somehow it just refuses to work, even though the rest of the script runs fine. Should I check for this on the client, or am I doing something wrong?
Check to make sure you are sending all remote events properly and use prints to check if all the scripts are running.
(It would really help if you added some code samples)
I have 2 of these checks, one in the server script and one in a ModuleScript.
server:
AttackAnimation:GetMarkerReachedSignal("Hit"):Connect(function()
if not Character:FindFirstChild("Stunned") then
if Humanoid.Health ~= 0 then
-- It's worked on the server script.
HitModule.Hit(Player)
else
-- Some other stuff
end
end
end)
module:
if not Character:FindFirstChild("Stunned") or not Character:FindFirstChild("TrueStun") or Humanoid.Health ~= 0 then
-- pvp logic
end
Hello you can add a value when using cancellable moves and make the value true then if a player hits you and cancels the attack the value gets false so before you do the damage check the value is true or false if its true you do damage if false you dont