I have tried this and it didn't work :C please help me with this
function hit (h) h.health = 0 end game.Workspace.Part.Touched:connect(hit)
and the output said "health is not a valid member of part" or something
Health is not a member of part, it is a part of Part.Parent.Humanoid
function hit (h) if h.Parent:findFirstChild("Humanoid") then if h.Parent.Humanoid.Health ~= 0 then --Kinda a debounce h.Parent,Humanoid.Health = 0 end end end game.Workspace.Part.Touched:connect(hit)
Health isn't actually a thing in your character, it's the Humanoid.