Home / Player

p:kick()

p:kick([reason])

Disconnects an online player.

Parameters

NameTypeDescription
reasonstring, optionalShown to the player on the disconnect screen.

Returns

Nothing.

Example

on('chat', function(e)
  if e.message:lower() == "hack" then
    e.player:kick("Hacking is not allowed.")
    e:cancel()
  end
end)