✓ Accepted answer
No, sorry. It's not correct :(
- Game.Players.Player is absolutely wrong. game.Players:GetChildren() would find all the players, if thats what you want.
- You never actually use chance in your script...
- Lighting is not in workspace... I assume you mean the service Lighting, and not a model in workspace called lighting?
- I would move Micheal into ServerStorage, not Lighting.
- I don't know what exactly you were trying to do with line 7...
- char = character? The script doesn't know what 'character' is. You must define that character is a property of player, and you don't need to to be a variable.
Other than that, I am not sure what you need to do. I would say...
- Use the player table game.Players:GetChildren() and math.random to find a random player: something like math.random(1, #players)
- Change the character of that player.
Good luck, and Happy Scripting :)
-Antharaziia
2 comments
I'm not sure if you can directly set the player's character. You also should probably change line 2 to "local chance = math.random(game.Players.NumPlayers)".
You can't use character appearance, unless you find a guy who are dressed as michael myers on ROBLOX.