Instance.new("fire") kills user

Instance.new not working

I’ve been trying to make it so, when the player makes contact with the block, it lights them on fire, I applied this to,

otherPart.Parent:FirstFirstChild("Head) = Instance.new(“Fire”)

(otherPart is the parameter I used for a function)

When I did this, I went onto the part that was supposed to make the head get the “fire” effect, but it just ends up killing the player, does anyone have and solutions to fix this?

FYI, its not a syntax error, so if there is any syntax errors there its because I didn’t copy and paste my code directly.

Fixed code:

otherPart.Parent:FirstFirstChild(“Head”) = Instance.new(“Fire”,(my head variable))

Instance.new(“Fire”, playerHead), this might fix it because I think the fire replaced the Player’s head

2 Likes

@Entildo is correct, because if you replace the players head you will most likely kill the player.

Disregard, fixed it, so I deleted it. ( I created a circular reference on accident)

If you really want a humanoid to survive without a head you can disable its ‘RequiresNeck’ property.