SH = SpaceHat script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild(SH) ~= nil then hit.Parent.Head.BrickColor = BrickColor.new("White") hit.Parent.Head.face:remove() hit.Parent.Head:BreakJoints() end end)
SH = SpaceHat
Please help.
i think you need to put quotation marks on the word SpaceHat like this.
SH = "SpaceHat"
and you need to remove the word "Head" on line 8 and it should be like this:
hit.Parent:BreakJoints()
because BreakJoints only works on Model.
the script should be like this:
SH = "SpaceHat" script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild(SH) ~= nil then hit.Parent.Head.BrickColor = BrickColor.new("White") hit.Parent.Head.face:remove() hit.Parent:BreakJoints() end end)
i hope it helps.