Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't this player entered hat giver work?

I've been trying to figure out how to give a hat located in the Workspace to each player when they join the server. I need the players current hats removed, and then this hat given to them. So far, the player looks like a noob when they join, but they don't get the hat. Any help would be awesome.

Join = (function (Plyr)
	Plyr.CanLoadCharacterAppearance = false
	wait(1)
	
	local hat = game.Workspace.MorningGlasses:Clone()
	
	if not Plyr.Character then 
		Plyr.CharacterAdded:wait()
	end
	
	hat.Parent = Plyr.Character.Head
end)

wait(1)

game.Players.PlayerAdded:connect(Join)
for _,v in next, game.Players:GetPlayers() do
	Join(v)
end

The code above is what I've been working with. It's inside a script in ServerScriptService.

1 answer

✓ Accepted answer

Try putting the hat inside the character not the head.

hat.Parent = Plyr.Character

This discussion is preserved as it was. New answers, comments, and votes are closed.