Skip to content
On this page

getSyncedMeta()

Used to store cross-resource accessible information. This functionality stores an object on a player that can than be set with setSyncedMeta. This can also be accessed on client-side.

This type of meta is accessible anywhere but can only be set on server-side.

Function Definition

ts
public getSyncedMeta<V extends any>(key: string): V | undefined;

Arguments

  • key: string

Returns

  • V | undefined

Documentation

Examples

ts
const result = somePlayer.getSyncedMeta('myData');
if (!result) {
    // Data does not exist
    return;
}

console.log(result);

Documentation Created with ❤️ by Stuyk