How do i make it so that my players spawn as random characters each time they play? I've looked everywhere but can't find an answer.
You could use a morph function, like the one below, and morph them into a random character.
function MorphPlayer(Player, Morph) Player:ClearCharacterAppearance() local CurrentCharacter = Player.Character local CurrentHumanoid = CurrentCharacter:WaitForChild('Humanoid') local OriginalCFrame = CurrentCharacter.HumanoidRootPart.CFrame local CharacterMorph = Morph:Clone() CharacterMorph.Parent = workspace CharacterMorph.Name = Player.Name Player.Character = CharacterMorph CurrentCharacter:Destroy() CurrentCharacter = Player.Character CurrentHumanoid = CurrentCharacter.Humanoid repeat wait() until Player.Character == CharacterMorph local CameraFixer = script.CameraFixerScript:Clone() CameraFixer.Parent = Player.PlayerGui CurrentCharacter.Animate.Disabled = true wait(.1) CurrentCharacter.Animate.Disabled = false CurrentCharacter.HumanoidRootPart.CFrame = OriginalCFrame end
Event for when players spawn: API:Class/Player/CharacterAdded
You can pick a random element of a folder (for picking the morph) by doing something like this:
local Morphs = game.ServerStorage:WaitForChild('Morphs'):GetChildren() local RandomMorph = Morphs[math.random(#Morphs)]