It's In Games Like Murder Mystery Where It Changes The Appearance To A Noob Or Like Blox Hunt Or Roblox Battle
COMMUNITY QUESTION
How Do I Make A Player Have A Different Appearance At Spawn?
2 answers
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)
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
