Skip to main content

GameObject.GetPlayer()

Returns a MLPlayer object if this object or any of its ancestors is a ML Player. Null Otherwise.

Returns:

typeDescription
MLPlayerMLPlayer object if this object or any of its ancestors is a ML Player

Usage

---@type GameObject
local gameobject;


local val0 = gameobject.GetPlayer()

Extra Detail

Use GameObject.IsPlayer() to check if it can return a MLPlayer.