Ok. So I made my character have custom hair, and it is an accessory with a handle in it named Handle, and in that is a mesh. I want to know - why does the hair get transferred from me to another player when I touch them? It is really annoying. Thank you - here is my code where I create the hair.
local acc = Instance.new("Accessory", char.Head) acc.Name = "SSJHair" local handle = Instance.new("Part", char.Head.SSJHair) handle.Name = "Handle" handle.CanCollide = false handle.BrickColor = BrickColor.new("Lime green") handle.Transparency = 1 handle.Material = "Neon" local weld = Instance.new("Weld", handle) weld.Name = "AccessoryWeld" weld.Part0 = handle weld.Part1 = char.Head weld.C0 = CFrame.new(0, -0.5, 0) local mesh = Instance.new("SpecialMesh", handle) mesh.MeshId = "rbxassetid://430344159" mesh.Offset = Vector3.new(0, 0.5, 0.5) mesh.Scale = Vector3.new(6, 6, 6) local attachment = Instance.new("Attachment", handle) attachment.Name = "HairAttachment" attachment.Position = Vector3.new(0, 0.1, -0) attachment.Axis = Vector3.new(1, -0, 0) attachment.SecondaryAxis = Vector3.new(0, 1, 0) if acc:FindFirstChild("TouchInterest") ~= nil then acc:FindFirstChild("TouchInterest"):Destroy() end
After the hair is put on the head, be sure to disable the script.
local acc = Instance.new("Accessory", char.Head) acc.Name = "SSJHair" local handle = Instance.new("Part", char.Head.SSJHair) handle.Name = "Handle" handle.CanCollide = false handle.BrickColor = BrickColor.new("Lime green") handle.Transparency = 1 handle.Material = "Neon" local weld = Instance.new("Weld", handle) weld.Name = "AccessoryWeld" weld.Part0 = handle weld.Part1 = char.Head weld.C0 = CFrame.new(0, -0.5, 0) local mesh = Instance.new("SpecialMesh", handle) mesh.MeshId = "rbxassetid://430344159" mesh.Offset = Vector3.new(0, 0.5, 0.5) mesh.Scale = Vector3.new(6, 6, 6) local attachment = Instance.new("Attachment", handle) attachment.Name = "HairAttachment" attachment.Position = Vector3.new(0, 0.1, -0) attachment.Axis = Vector3.new(1, -0, 0) attachment.SecondaryAxis = Vector3.new(0, 1, 0) if acc:FindFirstChild("TouchInterest") ~= nil then acc:FindFirstChild("TouchInterest"):Destroy() script.Disabled = true end