|
| 13 Nov 2013 09:47 PM |
idk what's wrong with this:
if plyr:IsInGroup(913186) then plyr.PlayerGui.NotGroup.Background.Visible = false end
-- This is located in the starterpack so that every time a player respawns it checks if they are in the group and if they are it removes the error message locaated in startergui, but idk whats wrong |
|
|
| Report Abuse |
|
|
|
| 13 Nov 2013 09:52 PM |
| I thought its PLR not PLYR |
|
|
| Report Abuse |
|
|
|
| 13 Nov 2013 09:55 PM |
@Tang Its a variable
PLR = "SO WOW" print(PLR)
PLYR = "SO WOW" print(PLYR) |
|
|
| Report Abuse |
|
|
|
| 13 Nov 2013 09:56 PM |
No it's plyr
But Im uncertain whether I can use the same variable and that's why it's messing up |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 13 Nov 2013 09:57 PM |
Indeed a mistake, but not stupid. Making mistakes is how one learns.
Anyways, enough with the wisdom.
plyr isn't defined
There are two methods that come to my mind right now.
Method 1:
repeat wait() until script.Parent.Parent if script.Parent.Parent:IsInGroup(913186) then script.Parent.Parent.PlayerGui.NotGroup.Background.Visible = false end
Method 2:
game.Players.PlayerAdded:connect(function(plr) -- plr refers to the player that has joined the server, so it is defined if plr:IsInGroup(913186) then plr.PlayerGui.NotGroup.Background.Visible = false end
|
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 13 Nov 2013 09:57 PM |
The first method has to be in startergui or starterpack
The second method does not. |
|
|
| Report Abuse |
|
|
|
| 13 Nov 2013 09:59 PM |
| Well I'm trying to make it so that it checks and removes the GUI every time the player spawns, so method 1 would work for that, correct? |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 13 Nov 2013 10:01 PM |
Yes.
Btw, method 2 should have end) not end on one of it |
|
|
| Report Abuse |
|
|
|
| 13 Nov 2013 10:50 PM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) if player:IsInGroup(913186) then player.PlayerGui.NotGroup.Background.Visible = false end
end) end)
maybe?? |
|
|
| Report Abuse |
|
|
|
| 13 Nov 2013 10:52 PM |
gah, nvm, sorry.
Didn't read the rest of your post, most of my above post is unneeded |
|
|
| Report Abuse |
|
|