I am trying to add this meshpart that looks like hair on the player:

local player = game.Players.LocalPlayer
local char = player.Character
local hum = player.Character.Humanoid
local canTrans = true



player.Chatted:connect(function(msg)--changing health
	if string.sub(msg, 1, 13) == "transform" and canTrans == true then
		wait(3)
		hum.MaxHealth = hum.MaxHealth * 50
		hum.Health = hum.Health * 50
	end
end)

player.Chatted:connect(function(msg)--chat transform 
	if string.sub(msg, 1, 13) == "ssj" and canTrans == true then
		canTrans = false
		if char:FindFirstChild('Humanoid') then --delete accessories
			for i,v in pairs(char:GetChildren()) do
				if v:IsA'Accoutrement' or v:IsA'Hat' then
					game.Debris:AddItem(v, .3); 
				end
			end
		end
	end
		local part = Instance.new("Part")
		part.Material = "Neon"
		part.Size = Vector3.new(2,2,2)
		part.Parent = workspace
		part.Anchored = true
		part.CanCollide = false
		part.Shape = "Ball"
		part.BrickColor = BrickColor.new("New Yeller")
		part.CFrame = char.Torso.CFrame
		
			for i = 1,750,5 do
			wait()
			part.Size = part.Size + Vector3.new(.25,.25,.25)
			part.CFrame = char.Torso.CFrame
			end
			part:Destroy()
		wait(1)
		local hair = game.ServerStorage.MeshPart:Clone()--referencing the hair meshpart
		hair.Parent = char.Head
		hair.Position = char.Head.Position
	
		
	end)

The script deletes all accessories. How do I make a meshpart a wearable accessory and how do I add it into the player in a script?

3 comments

0

Create an Accessory, then MeshPart parented to Accessory and named Handle. Name the Accessory whatever.

0

I tried that. Is that suppose to make it go on my head as I touch it?

0

never mind it works. I wish you put it in answers because then i could mark this question answered :(