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: Broken GUI admin.

Previous Thread :: Next Thread 
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
04 Mar 2012 10:57 AM
function onEnter(newplayer)
if newplayer.Name == "iPremiumZ" or "blackie1523" then
newplayer.PlayerGui.AMGUI.Frame.Visible = true
end
end
game.Players.ChildAdded:connect(onEnter)
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
04 Mar 2012 11:07 AM
The PlayerGui doesn't exist when this script is running. Try this:

    local allowed = {["iPremiumZ"] = true, ["blackie1523"] = true, ["ElectricBlaze"] = true}
    game.Players.PlayerAdded:connect(function(player)
        player.CharacterAdded:connect(function(character)
            if allowed[player.Name] then
                player.PlayerGui.AMGUI.Frame.Visible = true
            end
        end)
    end)

You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss-
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
05 Mar 2012 09:08 AM
Is there any way to make it visible if they're wearing a certain t-shirt?
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
05 Mar 2012 03:00 PM
...That's exactly what I just posted.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Mar 2012 03:01 PM
Really Blaze? o.o

† KMXD †
Report Abuse
top1 is not online. top1
Joined: 05 Mar 2009
Total Posts: 115
05 Mar 2012 03:01 PM
Elec, how is that so?...
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
05 Mar 2012 03:03 PM
Well, that depends on whether he was trying to emphasize the word "wearing". I made it so if you OWN a certain T-Shirt it makes his GUI visible.
Report Abuse
top1 is not online. top1
Joined: 05 Mar 2009
Total Posts: 115
05 Mar 2012 03:04 PM
You're just checking the name from a table...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Mar 2012 03:05 PM
No, you made it so if a player that joins has one of the names in the table if would show the GUI...

† KMXD †
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
05 Mar 2012 03:05 PM
Wait, sorry, no I didn't. I forgot to post that line. ._.

local allowed = {["iPremiumZ"] = true, ["blackie1523"] = true, ["ElectricBlaze"] = true}
local tshirtid = 00000000 --change
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        if allowed[player.Name] and game:service("BadgeService"):UserHasBadge(player.userId, tshirtid) then
            player.PlayerGui.AMGUI.Frame.Visible = true
        end
    end)
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Mar 2012 03:06 PM
Lol, there we go. Although, I would use "or" so that he can sell VIP shirts, or whatever.

† KMXD †
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
05 Mar 2012 03:06 PM
Right, latepost. Of course. When I wrote my script yesterday, I had MEANT to do what Is aid I did, but I must have unknowingly forgotten to type what I just added.
Report Abuse
top1 is not online. top1
Joined: 05 Mar 2009
Total Posts: 115
05 Mar 2012 03:07 PM
You should use or instead of and..
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
05 Mar 2012 03:09 PM
Yes, I realize. Those are small things I usually fix later. :/
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