hello Everyone!
My name is dodosnicker I have a model that needs to be a hat that spawns on the persons head when they join. The hat is not put as an anything, it is just a model right now.
Thank you!
It’s not a good solution, but I made a model of a hat welded to a head, have the head invisible and uncollidable. I put the model into ServerStorage, and coded it so when a player joins, it checks when they spawn and clones the model into their character, and welds the fake head to the real head.
Code looks something like this:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local model = game.ServerStorage.Model:Clone()
model.Parent = char
local weld = Instance.new("Weld")
weld.Parent = model.FakeHead
weld.Part0 = model.FakeHead
weld.Part1 = char.Head
end)
end)
okay…but I have never scripted before…lol
I will try it! Thank you so much!
its updated now, dont forget to weld the hat parts to the fake head and have it unanchored
its also recommended to have the script in ServerScriptService
Did it work for you or were there any errors?
I have a problem… I made my character quite small like the size of a bloxikin; the hats are massive and they should be the size of the actual startercharacters head. How do I fix this?
make the hat smaller, and the reference head its welded to