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.
Why is this happening?
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.
Why is this happening?
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
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
Funny thing is, it turned out to be my debounce that was causnig errors
Thanks for the help