player.getSyncedMeta
Description
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.
Syntax
getSyncedMeta(key: string): void;
Real World Example
const result = player.getSyncedMeta('myData');
if (!result) {
// Data does not exist
return;
}
console.log(result);