You may think this maybe a silly question, but I was making a gas mask for SCP Breakout V.0.0.2 Alpha version, and i got this gasmask you click and it gives you a tool. You have to activate the tool and then you get the mask on your head, but it doesn't work without error. Why?

script.Parent.Parent.Activated:Connect(function(player)
	local h = Instance.new("Hat")
	print("hi") --Added to print if it works.
		h.Parent = game.Players.LocalPlayer.Character
		script.Parent:Clone()
		h.AttachmentPos = Vector3.new(-0.21, 0.35, 0.65)
		h.AttachmentRight = Vector3.new(1, 0, 0)
		h.AttachmentUp = Vector3.new(0, 1, 0)
		h.AttachmentForward = Vector3.new(-0, -0, -1)
end)

5 comments

0

Are you using a localscript or a server script?

0

^ Localscript. Oh and it'll be a singeplayer game.

0

make sure the meh or part is named handle also u don't need to all that attachment there is a plugin called hat grip iedtor

0

The Hat class is deprecated, use Accessory. Also, Activated does not pass the player.

0

I just find it pointless, as it just spawns on the ground.