Hello! I have been having this issue where a simple take damage touch event keeps registering every single part of a character. This includes everything from body parts and accessories.
The code is as follows:
local debounce = false
script.Parent.Touched:Connect(function(hit)
local h = hit.Parent.Humanoid
if h ~= nil and debounce == true then
h:TakeDamage(20)
debounce = true
wait(1.6)
debounce = false
end
end)
and this is the error it gives
19:23:00.458 Humanoid is not a valid member of Accessory "Workspace.omotashi.Dragon Empress Skirt" - Server - Script:4
19:23:00.458 Stack Begin - Studio
19:23:00.458 Script 'Workspace.Tutorial.Level 3.DamBrick.Script', Line 4 - Studio - Script:4
19:23:00.458 Stack End - Studio
Any help would be great!