local RS = game:GetService("ReplicatedStorage")
local SwordDamage = RS:WaitForChild("SwordDamage")
local Sword = game.StarterPack.Sword.Handle
local debounce = false
SwordDamage.OnServerEvent:Connect(function()
print(1)
Sword.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") and not debounce then
debounce = true
print(2)
Hit.Parent.Humanoid:TakeDamage(10)
wait(0.5)
debounce = false
end
print(3)
end)
print(4)
end)
The problem here is that whenever I call the remote event, the damage function won't work ( the 2nd function the middle). When I would run it there would be no errors in the output and would print only "1" and "4". How do I get this to work?

1 comment
Hey man I’m going to send you a friends req on Roblox and we can go into studio