generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Admin Script Help

Previous Thread :: Next Thread 
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
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
SmoothBlockModel is not online. SmoothBlockModel
Joined: 26 Sep 2008
Total Posts: 2155
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
SmoothBlockModel is not online. SmoothBlockModel
Joined: 26 Sep 2008
Total Posts: 2155
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 is not online. 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 is not online. 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
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
26 Jul 2013 06:53 PM
@SmoothBlockModel, it's not working for me. I'm trying for both script, and Local.
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
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
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
26 Jul 2013 07:01 PM
@ScrewDeath, I have a question about i,v in pairs. What does it do?
Report Abuse
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
26 Jul 2013 07:03 PM
@ScrewAdmin, the script didn't work. I don't know what to say.
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image