|
| 23 Nov 2015 11:09 PM |
My code looks something like this.
function onPlayerEntered(player)
print("waiting") player.PlayerGui:WaitForChild("ZoneGUI") print("waited") end game.Players.PlayerAdded:connect(onPlayerEntered)
--It only prints waiting yet ZoneGUI is in the player's startergui and exists in the playergui. I'm kinda new to FE can someone let me know what's wrong? |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 23 Nov 2015 11:15 PM |
Is this a local or serverscript?
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 23 Nov 2015 11:25 PM |
| ServerScripts cannot access PlayerGui, backpack, starterpack or playerscripts |
|
|
| Report Abuse |
|
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 23 Nov 2015 11:25 PM |
| with filtering enabled that is |
|
|
| Report Abuse |
|
|
RoReimer
|
  |
| Joined: 12 May 2013 |
| Total Posts: 170 |
|
|
| 23 Nov 2015 11:25 PM |
if onPlayerEntered(player) == true then print("waiting") game.Players.LocalPlayer.Player.PlayerGui:WaitForChild("ZoneGUI") print("waited") end game.LocalPlayers.Players.PlayerAdded:connect(onPlayerEntered)
put this in soundscape |
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 23 Nov 2015 11:25 PM |
Try disabling FE and see if it works
Other wise there is no ZoneGui, or PlayerAdded doesnt work in testing mode
Dogemon, gotta pet them all! |
|
|
| Report Abuse |
|
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 23 Nov 2015 11:26 PM |
| PlayerAdded does work in testing mode? |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2015 11:27 PM |
If it works without FE youll need RemoteFunctions, and RemoteEvents, etc
<3 cats <3 |
|
|
| Report Abuse |
|
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 23 Nov 2015 11:27 PM |
| I use it all the time and it works fine in play solo:P |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2015 11:29 PM |
| I put the same code into a client script and nothing happened at all. This is in the serverscriptservice btw. |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2015 11:29 PM |
| How could I explain this? You could describe this by saying GUIs are local and aren't replicated to the server, I guess. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 24 Nov 2015 12:32 AM |
I put this into a local script and it didn't even run, I'm wondering why?
|
|
|
| Report Abuse |
|
|
|
| 24 Nov 2015 12:48 AM |
| Are you testing it in solo mode, or on an online game server? |
|
|
| Report Abuse |
|
|