I’m working on a fist combat system and I’ve run into a roadblock for the blocking system(heh) where pressing q will play the animation but lifting q won’t stop it. It’s not a problem with the client side as it can print “yes” going up and down, and the server is fine as you can’t punch while holding q but after releasing you can. Help.
Server:
elseif action == "Block" then
local track = player.Character.Humanoid:LoadAnimation(script.Block.BlockIdle)
if block == true then
track:Play()
elseif block == false then
track:Stop()
end
end
end)
Client:
UIS.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.Q then
game.ReplicatedStorage.Events.CombatEvent:FireServer(combo, "Block", true)
block = true
end
end)
UIS.InputEnded:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.Q then
game.ReplicatedStorage.Events.CombatEvent:FireServer(combo, "Block", false)
block = false
end
end)