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

How Do I Make A Player Have A Different Appearance At Spawn?

Asked by 9 years ago

It's In Games Like Murder Mystery Where It Changes The Appearance To A Noob Or Like Blox Hunt Or Roblox Battle

2 answers

Log in to vote
0
Answered by 9 years ago

There is a method

Player = game.Players.LocalPlayer

game.Players.PlayerAdded:connect(function() -- Add hats, remove hats, shirts, pants, you should be able to do that by looking at workspace or just WaitForChild/IsA/ect, methods

end)

Ad
Log in to vote
0
Answered by 9 years ago

The LoadCharacter method works in conjunction with the CharacterAutoLoads property.

This code was taken directly from the CharacterAutoLoads Wiki page.

local respawnTime = 5

local Players = Game:GetService("Players")
Players.CharacterAutoLoads = false

Players.PlayerAdded:connect(function(Player)
    Player.CharacterAdded:connect(function(Character)
        -- find the humanoid, and detect when it dies
        local Humanoid = Character:FindFirstChild("Humanoid")
        if Humanoid then
            Humanoid.Died:connect(function()
                -- delay, then respawn the character
                wait(respawnTime)
                Player:LoadCharacter()
            end)
        end
    end)

    Player:LoadCharacter() -- load the character for the first time
end)

Answer this question