I am trying to make a hitbox for a sword I'm making, the hitbox is working fine, but I would like a hit sound to play in the player's torso when they touch the hitbox, how can I do this?
local debounce = false script.Parent.Touched:connect(function(hit) if debounce == false then debounce = true if hit.Parent:FindFirstChild("Humanoid")then hit.Parent.Humanoid:TakeDamage(5) end wait(3) debounce = false end end)
add the sound to the script make the sound's parent the script
then, after you make the other player do damage, do
PutSoundHere:Play()