Client
This package contains methods and attributes involved with pure client-sided components.
Package Attribute | Value |
---|---|
__singleton | true |
__domain | local |
Properties
Client
Client.Client:
Player
Returns the Player object for the client. Equivalent to game.Players.LocalPlayer
.
PlayerGui
Client.PlayerGui:
PlayerGui
Returns the PlayerGui of the client.
Functions
BindMouseLock
Client:
BindMouseLock
(
key:
string
) →
(
)
Change the MouseLock keybind for the client. A complete list of all the keys can be found here.
DisableControls
Client:
DisableControls
(
) →
(
)
Disable control for the client character.
EnableControls
Client:
EnableControls
(
) →
(
)
Re-enable control for the client character.
GetCharacter
This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. YieldsPerforms appropriate checks to see if the client character exists and if it does, returns the character Model
, Humanoid
, and the HumanoidRootPart
. Returns nil
if the character doesn't exist and waitFor
isn't set to true
.