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: Any idea why PlayerAdded doesn't run?

Previous Thread :: Next Thread 
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
21 Nov 2016 10:58 AM
Any idea why the PlayerAdded function doesn't run?

My script:

print("eh")

game.Players.PlayerAdded:connect(function(player)
print("eek")
local key_m = "marketdata_" .. player.userId
local bef = ds:GetAsync(key_m)
print("hi")
if bef[1] then
print("hi")
script.Parent.OnSale.Value = bef[1]
script.Parent.OwnsItem.Value = bef[2]
end
end)

Output:
>> eh



Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
21 Nov 2016 10:59 AM
Use :Connect instead of :connect. The latter is deprecated.
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
21 Nov 2016 11:00 AM
Still won't work


Report Abuse
supremebloxboy is online. supremebloxboy
Joined: 12 Jun 2010
Total Posts: 424
21 Nov 2016 11:00 AM
Try using ChildAdded instead, I think PlayerAdded is a little wonke in playsolo, If thats when your referring to


Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
21 Nov 2016 11:01 AM
Thanks, but PlayerRemoving isn't working either. Any help on this?


Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
21 Nov 2016 11:02 AM
Btw still doesn't work


Report Abuse
supremebloxboy is online. supremebloxboy
Joined: 12 Jun 2010
Total Posts: 424
21 Nov 2016 11:02 AM
Try ChildRemoved lol


Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
21 Nov 2016 11:03 AM
yeah but that triggers after its removed


Report Abuse
robbe12345 is not online. robbe12345
Joined: 11 Nov 2008
Total Posts: 105
21 Nov 2016 11:03 AM
Any errors?
Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
21 Nov 2016 11:07 AM
Nope. I included the full output in the orginal post.


Report Abuse
Sublivion is not online. Sublivion
Joined: 16 Jun 2013
Total Posts: 2390
21 Nov 2016 11:08 AM
SOLVED: The script is inside a gui that is of course given to the player after it joins.


Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
21 Nov 2016 11:11 AM
*Breathe in* ***BOIIII****
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