@elentium/dataservicetyped
v1.0.5
Published
Unofficial roblox-ts bindings for DataServiceTyped — persistent, auto-replicated player data
Maintainers
Readme
@rbxts/dataservicetyped
Unofficial roblox-ts bindings for DataServiceTyped.
Install
npm i @rbxts/dataservicetypedUsage
import DataServiceTyped from "@rbxts/dataservicetyped";
const template = {
currency: 0,
inventory: {
apples: 5,
},
};
const Data = DataServiceTyped({ template });
// Server
const server = Data.server;
const playerData = server.Service.waitForData(player);
playerData.currency(50);
playerData.currency.Changed((value) => print(value));
// Client
const client = Data.client;
client.currency.Changed((currency) => print(currency));Original library by Leif Stout. This fork only adds roblox-ts typings and packaging.
