Character
Character-related APIs.
local localPlayer = Players.LocalPlayer()
local char = playerClient:GetCharacter()
Class Instance Methods
GameObject:GetPosition(): vec3
Returns the position of the game object.
Returns: vec3 - The position of the game object
Example:
local position = gameObject:GetPosition()
print("Game object position: " .. tostring(position))
GameObject:GetRotation(): quat
Returns the rotation of the game object.
Returns: quat - The rotation of the game object
Example:
local rotation = gameObject:GetRotation()
print("Game object rotation: " .. tostring(rotation))
GameObject:GetEulerRotation(): quat
Returns the euler rotation of the game object.
Returns: vec3 - The euler rotation of the game object
Example:
local eulerRotation = gameObject:GetEulerRotation()
print("Game object euler rotation: " .. tostring(eulerRotation))
Damageable:GetHP(): number
Returns the health of the damageable.
Returns: number - The current health of the damageable object
Example:
local health = damageable:GetHP()
print("Object health: " .. health)
Character:GO(): GameObject
Returns the GameObject instance of the character.
Returns: GameObject - The GameObject instance of the character
Example:
-- Get the character's GameObject for transform manipulation
local gameObject = character:GO()
local position = gameObject:GetPosition()
print("Character position: " .. tostring(position))