Datastores at client

Hello guys!

I’m trying to do a DataStore that saves the CanCollide and Transparency of a part, and when the player joins, it loads the CanCollide and the Transparency that’s given from the DataStore.

But, the real problem is that I’m trying to do that at the client, because when a new player joins (A player that never played the game) he’s going to start with the blocks at the normal CanCollide and Transparency, except for other players, that their blocks going to be different from the blocks at the server.

Are that possible? I tried scripting, but nothing seems to work for me.

(I’m going to do a gui with buttons to make the blocks disappear)

You can only interact with DataStores on the server, so you’ll need a remote to ask the server to do this for you. Whenever DataStore fails to get a value for a given player, you can assume they are new and give them a default set, which then gets saved at the next normal save time.

Caution: when I say fails I mean the DataStore successfully gets an empty result. Otherwise saves could get overwritten anytime DataStore fails for an unrelated reason.

That worked for me! thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.