generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

I need some help with remote events and datastores... :(

Previous Thread :: Next Thread 
TheOrionUniverse is not online. TheOrionUniverse
Joined: 13 Dec 2016
Total Posts: 2
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
TheOrionUniverse is not online. TheOrionUniverse
Joined: 13 Dec 2016
Total Posts: 2
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
RangerLaina is not online. RangerLaina
Joined: 18 Feb 2016
Total Posts: 1024
17 Jan 2017 08:54 PM
any errors in output?


attempt to call life (a nil value)
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Jan 2017 08:57 PM
store the remote event in replicatedstorage


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image