Event.OnServerEvent:Connect(function()
if Move == 1 then
--Animation 1
end
if Move == 2 then
--Animation 2
end
if Move == 3 then
--Animation 3
end
if Move == 4 then
--Animation 4
end
Handle.Touched:Connect(function(hit)
local Humanoid = hit.Parent.Humanoid
Humanoid:TakeDamage(Damage)
Event:Disconnect()
end)
if Move == 1 then
--Animation 1
end
if Move == 2 then
--Animation 2
end
if Move == 3 then
--Animation 3
end
if Move == 4 then
--Animation 4
end
Handle.Touched:Connect(function(hit)
local Humanoid = hit.Parent.Humanoid
Humanoid:TakeDamage(Damage)
Event:Disconnect()
end)
Sorry for saying that, but this title donât make any sense.
You canât stop the remote events, if the remote event is be using like a loop, itâs a problem with the local script that is firing the remote event or the script that is connected with the remote event.
Event.OnServerEvent:Connect(function()
if Move == 1 then
--Animation 1
end
if Move == 2 then
--Animation 2
end
if Move == 3 then
--Animation 3
end
if Move == 4 then
--Animation 4
end
Handle.Touched:Connect(function(hit)
local Humanoid = hit.Parent.Humanoid
Humanoid:TakeDamage(Damage)
Event:Disconnect()
end)
Up above I mentioned the problem here is the solution. Your touched function is firing super fast, so this makes it so that the humanoid can only be hit once.
local hits = {}
Handle.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")--Looking for a humanoid, this is neccessary because a part may touch it which is not a player
if humanoid and hits[humanoid] == nil then --If it is a player, and the humanoid is not already in the table, this is the part to solve your problem
Humanoid:TakeDamage(Damage)
hits[humanoid] = true
end
end)