Skip to content

2024r176 Ex1 to 2024r176 Ex2

Table of Contents

  1. Breaking Changes
  2. Bug Fixes
  3. New Features

Breaking Changes

IsLocal -> IsWornByMe

  • Description: The IsLocal global was causing a lot of confusion. So it was renamed to IsWornByMe
  • Usage:
    1
    2
    3
    4
    5
    6
    if RunningInAvatar then
        print('This script is running on an Avatar!')
        if IsWornByMe then
            print('And is being worn by me!!!')
        end
    end
    

Bug Fixes

  • Fixed the global variable IsSpawnedByMe, it should now work properly on props

New Features

AvatarAPI

  • AvatarAPI.LocalAvatar is now available globally as a way to get a reference to the Local Player worn Avatar instance
  • Wearer is now available as Avatar property. It returns the PlayerAPIBase of the Avatar's wearer

PlayerAPI

  • IsFriendsWith(string userId) method is now available on PlayerAPI
  • IsFlying property is now available on LocalPlayerAPI
  • SetPosition and SetRotation methods are now available on LocalPlayerAPI
  • TeleportPlayerTo method with a Quaternion rotation target is now available on LocalPlayerAPI