Skip to main content

PlayerSetPosXYZArea

Description

Unless AreaDisableCameraControlForTransition was called, switching to a new area will cause the camera to fade out then in. This is the backing function for AreaTransitionXYZ and will return immediately rather than waiting for the area to load, you can use AreaIsLoading to monitor the loading process.

function PlayerSetPosXYZArea(x, y, z, id) --[[ ... ]] end

Parameters

  • x: number - The X coordinate of the location where the player will be moved.
  • y: number - The Y coordinate of the location where the player will be moved.
  • z: number - The Z coordinate of the location where the player will be moved.
  • id: number - The area ID to which the player will be moved.

Return Values

None.

Example

Move the player in front of the boy's dorm.

PlayerSetPosXYZArea(270, -110, 6, 0)
while AreaIsLoading() do
Wait(0)
end
TextPrintString("Warped to boy's dorm!", 3, 1)