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
|
  |
| 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
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 2390 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 2390 |
|
| |
|
| |
|
Sublivion
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 2390 |
|
|
| 21 Nov 2016 11:03 AM |
yeah but that triggers after its removed
|
|
|
| Report Abuse |
|
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 21 Nov 2016 11:11 AM |
| *Breathe in* ***BOIIII**** |
|
|
| Report Abuse |
|
|