Skip to content

Player

///info Authority

🟥 You cannot spawn or Destroy Players.

///

Examples#

-- Spawns and possess a Character when a Player joins the server
Player.Subscribe("Spawn", function(player)
    local new_char = Character(Vector(), Rotator(), "helix::SK_Male")
    player:Possess(new_char)
end)

-- Destroys the Character when the Player leaves the server
Player.Subscribe("Destroy", function(player)
    local character = player:GetControlledCharacter()
    if (character) then
        character:Destroy()
    end
end)

Static Functions#

Functions#

Events#