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
 

Re: Posting the the whole thing, since I don't get it anymore.

Previous Thread :: Next Thread 
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 06:11 PM
Here's the only chunk of the script that you need to worry about:

events = game.ReplicatedStorage.WaitForChild("Events")
players.PlayerAdded:connect(function()
events.SetData:FireClient(p, itemTable, dst1:GetAsync(k))
end)

events.SetData.OnServerEvent:connect(function(p, name, value)
print("Attempted to save "..p.Name.."'s data.")
local k = p.userId
local tab = dst1:GetAsync(k)
tab[name][2] = value
wait()
print("Wait...")
dst1:SetAsync(k, tab)
print("AYY LMAO! Saved "..p.Name.."'s data.")
end)

dst1 is dataStoreService:GetDataStore("TableData");The table is formatted like Table = {Thing1 = {"String", Bool}} in case you're wondering.

The client has absolutely NO problems. It can load and send data accordingly. But when SetData.OnServerEvent comes around, it only works like 25% of the time! I don't know what to do, I've been analyzing this for hours with no prevail. The table the client says is completely legit, the only, ONLY issue is when I get to "dst1:SetAsync(k, tab)"

WHENEVER I get here is where that 25% kicks in. I can fire as much as I want but only once or twice out of the like 10 times that i do it does the script actually get past this line...
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 06:17 PM
more info here http://forum.roblox.com/Forum/ShowPost.aspx?PostID=180460625
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 06:21 PM
1
Report Abuse
direMitten is not online. direMitten
Joined: 18 Jun 2015
Total Posts: 1294
27 Dec 2015 06:23 PM
players.PlayerAdded:connect(function(p)
events.SetData:FireClient(p, itemTable, dst1:GetAsync(k))
end)

The PlayerAdded event also gives you the player instance that was added. You need to pass it to the function that fires the event. I added 'p' to the arguments of the function. Try it now.
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 06:28 PM
oh sorry I left that out

it's in the script but when I was constructing the post I forgot it
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 06:38 PM
..2
Report Abuse
TheCaptainTeach is online. TheCaptainTeach
Joined: 11 Jul 2015
Total Posts: 3846
27 Dec 2015 06:41 PM
Erm, I'm not going to help you fix a FM script.

"AYY LMAO"
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 06:44 PM
"Erm, I'm not going to help you fix a FM script."

so because I jokingly put 'AYY LMAO' in there it automatically makes the script a FM?

did you not read the rest of the post? I obv know what im talking about

you probably cant even script get out
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 06:49 PM
3
Report Abuse
direMitten is not online. direMitten
Joined: 18 Jun 2015
Total Posts: 1294
27 Dec 2015 06:53 PM
WaitForChild is a method. You should call it with ':'
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 07:22 PM
"WaitForChild is a method. You should call it with ':'"

why would that be the issue if it's always printing
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
27 Dec 2015 07:36 PM
you shouldnt call it with ":", you need to.
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 07:54 PM
bump because hours after this thing is still bugged for no reason
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
27 Dec 2015 08:06 PM
UUUUUUGGGGHHHHHHH
Report Abuse
TheCaptainTeach is online. TheCaptainTeach
Joined: 11 Jul 2015
Total Posts: 3846
28 Dec 2015 07:30 PM
Lol, you just said I can't script? RIP you poor sole. Die the way the rest of the FM scripters do.
Report Abuse
Barcado is not online. Barcado
Joined: 04 Oct 2014
Total Posts: 1278
28 Dec 2015 09:42 PM
quit being salty about how much your life sucks, no one cares

fixed the problem anyway, so you can put your ego away and gtfo
Report Abuse
SwagCuzYolo is not online. SwagCuzYolo
Joined: 31 Oct 2013
Total Posts: 1224
28 Dec 2015 09:58 PM
Weeaboos are so sassy
Report Abuse
TheCaptainTeach is online. TheCaptainTeach
Joined: 11 Jul 2015
Total Posts: 3846
29 Dec 2015 12:49 PM
^
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