Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Hat cloning script doesn't work?

Asked by
wackem 50
9 years ago

Any help is appreciated, all hierarchy is correct.

game.Players.PlayerAdded:connect(function(p)
        local char = p.WaitForChild("Character")
        local hat = game.Lighting.MidnightDominus:Clone()
        hat.Parent = char
end)

1 answer

Log in to vote
0
Answered by
drew1017 330 Moderation Voter
9 years ago

If i remember correctly, you need the Handle part of the hat to be connected to a part, otherwise it won't render.

0
New code: game.Players.PlayerAdded:connect(function(p) local char = p:WaitForChild("Character") local hat = game.ReplicatedStorage.MidnightDominus:Clone() hat.Parent = char hat.Handle.CFrame = char.Head.CFrame * CFrame.new(0, char.Head.Size.Y / 2, 0) * hat.AttachmentPoint:inverse() end) wackem 50 — 9y
Ad

Answer this question