I have a folder in ReplicatedStorage named 'StarterChars', I need help making it to where you get a random StarterCharacter when you spawn. Any help would be greatly appreciated.
01 | -- Clone one of the starter characters into Game.StarterPlayer and rename it to "StarterCharacter" so the first player who joins actually gets set as a starter character. |
02 | local StarterCharacters = { |
03 | game.ReplicatedStorage.StarterChars.StarterCharacter 1 , |
04 | game.ReplicatedStorage.StarterChars.StarterCharacter 2 , |
05 | game.ReplicatedStorage.StarterChars.StarterCharacter 3 |
06 | } |
07 |
08 | while wait( 0.5 ) do |
09 | if game.StarterPlayer:FindFirstChild( "StarterCharacter" ) then |
10 | game.StarterPlayer.StarterCharacter:Destroy() |
11 | end |
12 | local Randomize = StarterCharacters [ math.random( 1 , #StarterCharacters) ] :Clone() |
13 | Randomize.Name = "StarterCharacter" |
14 | Randomize.Parent = game.StarterPlayer |
15 | end |