remote = game.ReplicatedStorage.RemoteEvents:WaitForChild("SwordSlashRemote")
remote.OnServerEvent:Connect(function(plr, sword, playing, wow)
sword.Blade.Touched:Connect(function(part)
if not wow then
if part:FindFirstAncestor("Username for testing") then
if part.Parent:FindFirstChild("Humanoid") then
part.Parent.Humanoid:TakeDamage(30)
wow = true
wait(0.2)
wow = false
end
end
end
end)
end)
this is a script that responds to the SwordSlashRemote in replicatedstorage, it is fired every time you play an animation with a sword, I was wondering how to stop it from hitting multiple times, for now the wait(0.2) isn't very helpful because it still hits more than once sometimes.

1 comment
Perhaps increasing the wait time would do.