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 » Scripters
Home Search
 

Re: Group only team switch button

Previous Thread :: Next Thread 
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
12 Feb 2015 05:17 PM
I want a button that only clickable (or viewable) if you're in my group "The Greenwood Kings". Can someone please edit my current script to make people only able to switch to it if they're in "The Greenwood Kings" Group. If you help me I'll be thankful. :3

GUI Script:


function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(1111297) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright green")
end
end

script.Parent.MouseButton1Click:connect(Click)
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
12 Feb 2015 05:21 PM
local player = game.Players.LocalPlayer
local GROUP_ID = 0000
script.Parent.MouseButton1Click:connect(function()
if player:IsInGroup(GROUP_ID) then
player.TeamColor = BrickColor.new("blah")
player:LoadCharacter()
end
end)
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
12 Feb 2015 05:22 PM
Do I add that to the script (If so the top or bottom) or do I just change the script to that completley?
Report Abuse
PeteHaxYou is not online. PeteHaxYou
Joined: 21 May 2014
Total Posts: 13572
12 Feb 2015 05:35 PM
Aha, got it to work. Thanks mate, you're freaking awesome!
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
12 Feb 2015 05:53 PM
LocalScript in the GUI element
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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