|
| 17 Jan 2017 08:33 PM |
So I wrote up this little script for my datastore; very simple
print("Hello Mr Stark, Looks like we're back in action huh?")
local OceData = ga######################################################### game.Players.PlayerAdded:connect(function(player) player.chatted:connect(function(word) if##o####= "oce" then print(word .. " Spoken") local key = player.userId OceData:UpdateAsync(key, function(currentValue) local new = currentValue or 0 --incase the value is not existant. new = new + 1 print(OceData:GetAsync(player.userId)) return new end) end end) end)
local event = Instance.new("RemoteEvent") event.Name = "CallOce" event.Parent = game.Workspace event.OnServerEvent:connect(function(player) local key = player.UserId local number = OceData:GetAsync(player.UserId) local gui = player.PlayerGui.OceConsole.ScrollingFrame:findFirstChild(player.Name) gui.oNumber.Value = number end)
Then I call the even "CallOce"
here
game.Workspace.CallOce:FireServer(lPlayer.UserId, objt) objt.pName.Value = lPlayer.Name objt.Oce.Text = objt:findFirstChild("oNumber").Value objt.PlayerName.Text = objt.pName.Value
In test play it works flawlessly... and I'm sure there's a reason but when I take it to a live server I get nothing... In the output it will tell me I have X amount of Oce like I want but it won't update in my gui |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2017 08:52 PM |
| I'm sure my code is sloppy and work around central but I need some helps guy! :( |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2017 08:54 PM |
any errors in output?
attempt to call life (a nil value) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 17 Jan 2017 08:57 PM |
store the remote event in replicatedstorage
|
|
|
| Report Abuse |
|
|