Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local charactersFolder = game.Workspace:FindFirstChild("CharactersSelection")
- for i,char in pairs(charactersFolder:GetChildren()) do
- local click = char:FindFirstChildOfClass("ClickDetector")
- if click then
- click.MouseClick:Connect(function(plr)
- local newChar = char:Clone()
- if game.StarterPlayer:FindFirstChild("StarterCharacter") then
- game.StarterPlayer.StarterCharacter:Destroy()
- end
- newChar.HumanoidRootPart.Anchored = false
- newChar.Name = "StarterCharacter"
- newChar.Parent = game.StarterPlayer
- plr:LoadCharacter()
- end)
- end
- end
Add Comment
Please, Sign In to add comment