how can i convert this into making it give me a shaggy on spawn and replace my current hair, the shaggy i want is the rainbow shaggy.
local Character = script.Parent local Head = Character:WaitForChild('Head') wait(1) if Character.Name == "forsakern" then Head.face.Texture = 'rbxassetid://20052028' end
Add a script to ServerScriptService and add the following code to it.
Code:
local debounce = true game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local HumanoidDescription = character:WaitForChild("Humanoid"):WaitForChild("HumanoidDescription") local ID = 64082730 -- The Rainbow Shaggy ID. if character.Name == "Playername" and debounce == true then -- Replace "Playername" with the name you want to spawn with the Hair. debounce = false wait(0.5) -- Keep the wait, as I tested this without the wait it was just an infinite loading screen. HumanoidDescription.HairAccessory = ID player:LoadCharacterWithHumanoidDescription(HumanoidDescription) end end) end)