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: Badge only GUI?!?

Previous Thread :: Next Thread 
gdaka is not online. gdaka
Joined: 29 Dec 2011
Total Posts: 1438
21 Dec 2013 12:36 PM
I have no idea how to make a script like this, but for my game, I need to. If you help me, i'll be very grateful.


--Thanks!
Report Abuse
ColdSmoke is not online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
21 Dec 2013 12:38 PM
there's a million freemodels for this
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 Dec 2013 12:38 PM
Look into free models first.
Report Abuse
gdaka is not online. gdaka
Joined: 29 Dec 2011
Total Posts: 1438
23 Dec 2013 04:21 AM
-It's not there.


I'm talking about if you own a specific badge, the GUI shows. If you don't, it doesn't.
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
23 Dec 2013 04:25 AM
http://wiki.roblox.com/index.php/UserHasBadge_(Method) Edit the example accordingly. E.G: p.PlayerGui.GUINAME.Frame.Visible = true or something similar to that.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
gdaka is not online. gdaka
Joined: 29 Dec 2011
Total Posts: 1438
23 Dec 2013 04:30 AM


Okay, thanks. I'll stick with that for a while.
"If you date a fat girl, how long would it take you to date TONS of women?" --Philosophy with gdaka
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
23 Dec 2013 04:31 AM
No problem, post back if you need any more help.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
gdaka is not online. gdaka
Joined: 29 Dec 2011
Total Posts: 1438
23 Dec 2013 04:38 AM
I can tell this won't work.. but this is what I've got so far.

BadgeId = 139254179

game.Players.PlayerAdded:connect(function(p)
if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
print("The user has this badge")
game.Workspace.StarterGui."Choose your weapon - Alpha".Frame.Visible
end
end)

"If you date a fat girl, how long would it take you to date TONS of women?" -Philosophy with gdaka
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
23 Dec 2013 04:43 AM
BadgeId = 139254179

game.Players.PlayerAdded:connect(function(p)
if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
game.Workspace.StarterGui["Choose your weapon - Alpha"].Frame.Visible = true
else
game.Workspace.StarterGui["Choose your weapon - Alpha"].Frame.Visible = false
end
end)

Also, make sure the GUI's frame is not visible before you test and publish your game as some people could get into the GUI without the badge if you don't do that.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
gdaka is not online. gdaka
Joined: 29 Dec 2011
Total Posts: 1438
23 Dec 2013 05:10 AM
Thanks!

If there was a frame in "Choose your weapon - Alpha" called Main3 that you wanted the script to work on as the badge exclusive GUI, would you change the script to:

game.Workspace.StarterGui.Child["Main4"].Frame.Visible = true
?

"If you date a fat girl, how long would it take you to date TONS of women?" --Philosophy with gdaka
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
23 Dec 2013 05:22 AM
game.Workspace.StarterGui["Choose your weapon - Alpha"]["Main4"].Visible = true

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
23 Dec 2013 05:23 AM
Wait, I messed up, get rid of .Workspace in the script. I stupidly ignored it.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
23 Dec 2013 05:37 AM
if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
23 Dec 2013 05:38 AM
woah my computer didnt show any replies

ignore me lol
Report Abuse
gdaka is not online. gdaka
Joined: 29 Dec 2011
Total Posts: 1438
23 Dec 2013 02:27 PM
Thanks!
A LOT!
"If you date a fat girl, how long would it take you to date TONS of women?" --Philosophy with gdaka
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