Humanoid is not a member of model

image
I am trying to make a part that when you touch it, it gives you 10 health and destroys, but it is touching a model and not running anymore when i try to touch it.
image

Why is this happening?

1 Like

The workspace.Model is touching the part, so the part would look for a humanoid in it

I was using if hit.Parent.humanoid, because even without the if hit.parent.humanoid its the same error :frowning:

script.Parent.Touched:Connect(function(hit)
  if hit.Parent:FindFirstChild("Humanoid") then
    --do something to the player
  else
  --wut da, no humanoid?  do nothing i guess 
  end
end)

try this, never tested it yet

2 Likes

Funny thing is, it turned out to be my debounce that was causnig errors :man_shrugging:

Thanks for the help

1 Like