So i have this which spawns the hat inside the player but its not connected.
local button = script.Parent
button.MouseButton1Down:Connect(function()
local hit = game.Players.LocalPlayer.Character
hit.Parent:findFirstChild("Humanoid")
local h = Instance.new("Accessory")
local p = Instance.new("Part")
local a = Instance.new("Weld")
h.Name = "Tophat"
h.Parent = hit
p.Parent = h
a.Parent = p
p.Position = hit:WaitForChild("Head").Position
p.Name = "Handle"
p.formFactor = 0
p.Size = Vector3.new(2, 1, 1)
p.BottomSurface = 0
p.TopSurface = 0
p.Locked = true
game.Workspace.Hat.Mesh:Clone().Parent = p
h.AttachmentPos = Vector3.new(-1, 0.3, 0)
end)
3 comments
Would i then have to add Attachments to the accessory then
I don't believe so.
So ive made the script spawn the hat but its not attached