|
| 16 Jul 2015 07:44 PM |
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local hasplayed = player:FindFirstChild("PHPB4") if hasplayed then print("This player has joined my game before!") else print("The player is new!") local playerGUI = game.Lighting.NewPlayer_GUI:Clone() playerGUI.Parent = player.PlayerGui local PlayerHasPlayedBefore = Instance.new("InitialValue", player) PlayerHasPlayedBefore.Name = "PHPB4" end end)
There's never anything in the output when I go to test it. |
|
|
| Report Abuse |
|
|
drink
|
  |
| Joined: 03 Mar 2008 |
| Total Posts: 23 |
|
|
| 16 Jul 2015 07:50 PM |
| im not an expert on GUI's but what about making the GUI visible? |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2015 07:53 PM |
"im not an expert on GUI's but what about making the GUI visible?"
That didn't work.
I think that it has something to do with waiting for the player's data to load since whenever I test it in Studio nothing ever prints. |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2015 08:11 PM |
The issue was in the player:WaitForDataReady(). I'm not sure why, but when I removed that from the script and replaced it with wait(10), the script worked fine.
I also put "InitialValue" instead of "IntValue." |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2015 08:13 PM |
Are there alternatives to using player:WaitForDataReady()? I don't want to just put in wait(10) because what if the player's computer is really quick or really slow?
game.Players.PlayerAdded:connect(function(player) wait(10) local hasplayed = player:FindFirstChild("PHPB4") if hasplayed then print("This player has joined my game before!") else print("The player is new!") local playerGUI = game.Lighting.NewPlayer_GUI:Clone() playerGUI.Parent = player.PlayerGui playerGUI.Frame.Visible = true local PlayerHasPlayedBefore = Instance.new("IntValue", player) PlayerHasPlayedBefore.Name = "PHPB4" end end) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 16 Jul 2015 08:14 PM |
http://www.roblox.com/Forum/ShowPost.aspx?PostID=162506822
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
drink
|
  |
| Joined: 03 Mar 2008 |
| Total Posts: 23 |
|
|
| 16 Jul 2015 08:15 PM |
| how are you able to test this? |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2015 08:17 PM |
"http://www.roblox.com/Forum/ShowPost.aspx?PostID=162506822"
Thanks. |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2015 08:18 PM |
"how are you able to test this?"
I've been testing by using Play Solo mode on Studio and then checking the output for any issues. |
|
|
| Report Abuse |
|
|