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

Spawn in With a shaggy? Rainbow shaggy on spawn?

Asked by 4 years ago

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

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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)
0
how can u make it so only works for a specific player forsakern 12 — 4y
0
NVM I FIGURED IT OUT THANKYOu!! forsakern 12 — 4y
0
Okay, no problem. I just finished editing the code lol. Happy to help. xInfinityBear 1777 — 4y
0
wait can u make it so it stays spawning when u reset aswell character forsakern 12 — 4y
View all comments (2 more)
0
can u help so the shaggy stays when u reset aswell forsakern 12 — 4y
0
Sorry 'bout the late reply, having to rewrite the script and trying to get it to work, unfortunately I cannot get it to work, though I am not giving up, I'll still continue to get it to work for you, just not exactly sure on how long it will take. I'll make sure to update my answer and I'll make a comment whenever I get it done. xInfinityBear 1777 — 4y
Ad

Answer this question