Code: Select all
/c
local character = game.surfaces[1].create_entity{name = "player", position=game.player.position, force="player"}
game.players[2].set_controller{type = defines.controllers.character, character = character}
3. Get crash.
Code: Select all
/c
local character = game.surfaces[1].create_entity{name = "player", position=game.player.position, force="player"}
game.players[2].set_controller{type = defines.controllers.character, character = character}