|
| 26 Jul 2013 06:22 PM |
local admin = game.Players{"08184783274928374", "Player1"} repeat if admin == true then admin.PlayerGui.OpenDoorGUI.TextButton.Visible = true wait(1) end until admin == true
Can anyone help me, please?
Thanks again, ~HorrifyingInstance |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2013 06:27 PM |
local admin = {"08184783274928374", "Player1"}
game.Players.PlayerAdded:connect(function(p) for i,v in pairs(admin) do if p.Name == admin then repeat wait() until p.Character p.PlayerGui.OpenDoorGUI.TextButton.Visible = true end end end) |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2013 06:28 PM |
Wait thats wrong,
local admin = {"08184783274928374", "Player1"} --Admin Names
game.Players.PlayerAdded:connect(function(p) --Everytime a player enters check p.CharacterAdded:connect(function(c) --Check everytime character respawns for i,v in pairs(admin) do if p.Name == admin[i] then p.PlayerGui.OpenDoorGUI.TextButton.Visible = true end end end) end) |
|
|
| Report Abuse |
|
|
jakej78b
|
  |
| Joined: 09 Mar 2011 |
| Total Posts: 813 |
|
|
| 26 Jul 2013 06:30 PM |
What are you trying to do? If you want to see if their name is in the list you will need to use a table check. Also the game.Players{} is invalid command, here i will try to redo it for you:
admin = {"Name1", "AddSomeone",}
Game.Players.PlayerAdded:connect(function(plr) for i=1,#admin do if admin[i] == plr.Name then plr.PlayerGui.OpenDoorGui.TextButton.Visible = true end end end) |
|
|
| Report Abuse |
|
|
jakej78b
|
  |
| Joined: 09 Mar 2011 |
| Total Posts: 813 |
|
|
| 26 Jul 2013 06:31 PM |
| SmoothBlockModel's script would be better to use so then it shows the GUI everytime the person spawns, good work, I'm just a beginning helper trying to get in some more experience :) |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2013 06:53 PM |
| @SmoothBlockModel, it's not working for me. I'm trying for both script, and Local. |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2013 06:57 PM |
Put this in a local script:
local admin = {"08184783274928374", "Player1"} local p = game.Players.LocalPlayer for i,v in pairs(admin) do if p.Name == v then p.PlayerGui.OpenDoorGUI.TextButton.Visible = true end end |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2013 07:01 PM |
| @ScrewDeath, I have a question about i,v in pairs. What does it do? |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2013 07:03 PM |
| @ScrewAdmin, the script didn't work. I don't know what to say. |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2013 07:09 PM |
It loops through a table's values. Saying it doesn't work doesn't really help. Things like an output would though... |
|
|
| Report Abuse |
|
|