|
| 17 Jan 2015 05:04 AM |
So I've got a script in the workspace that either creates a data store if it doesn't already exist. Or loads a previously created one.
Anyways, besides that. I have a gui with a button that you click and it is supposed to save your values.
The below code is inside the button activated when you click it. But when I go online and click it the output says "Data store can't be accessed from client" How can I get this too work properly. This is creating a table to save all the values inside a GUI btw.
script.Parent.MouseButton1Down:connect(function(clicked)
local p = game.Players.LocalPlayer
local DataStore = game:GetService("DataStoreService"):GetDataStore(p.userId) local stats = p.PlayerGui.Stats:GetChildren() local s1 = {} for i=1,#stats do local n = stats[i].Name s1[n] = stats[i].Value end DataStore:SetAsync("Stats",s1) script.Parent.Text = p.PlayerGui.Stats.Test1.Value end) |
|
|
| Report Abuse |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
| |