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: Need help with this script.

Previous Thread :: Next Thread 
PartyTimeCc is not online. PartyTimeCc
Joined: 25 Aug 2009
Total Posts: 3193
15 Jul 2013 05:21 PM
function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(13783) then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Light blue")
end
end

script.Parent.MouseButton1Click:connect(Click)


I want it so that a specific group rank is able to get on this team and nobody else, how would I do that?

It is something on the lines of Parent:Isingroup(#) localrank = 18

Help?
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 05:26 PM
[ Content Deleted ]
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 05:28 PM
[ Content Deleted ]
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 05:32 PM
[ Content Deleted ]
Report Abuse
PartyTimeCc is not online. PartyTimeCc
Joined: 25 Aug 2009
Total Posts: 3193
15 Jul 2013 05:36 PM
Yes, but my question is how to have it at a specific rank, like so only specific ranks can be on that team.
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
15 Jul 2013 05:36 PM
You need to do CheckIfInGroup
Report Abuse
PartyTimeCc is not online. PartyTimeCc
Joined: 25 Aug 2009
Total Posts: 3193
15 Jul 2013 05:39 PM
How would I do that, I'm unsure with this.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 05:42 PM
[ Content Deleted ]
Report Abuse
sam8985 is not online. sam8985
Joined: 12 Nov 2011
Total Posts: 582
15 Jul 2013 05:50 PM
function Click(mouse)
if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(13783) then
if script.Parent.Parent.Parent.Parent.Parent:GetRankInGroup(13783) > 18 then
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Light blue")
end
end
end
script.Parent.MouseButton1Click:connect(Click)
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 05:52 PM
[ Content Deleted ]
Report Abuse
sam8985 is not online. sam8985
Joined: 12 Nov 2011
Total Posts: 582
15 Jul 2013 05:54 PM
Cuz dat's how I roll.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 05:55 PM
[ Content Deleted ]
Report Abuse
sam8985 is not online. sam8985
Joined: 12 Nov 2011
Total Posts: 582
15 Jul 2013 05:59 PM
Nuuuuuuuuu.
Tyvm.
Kthxbai.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 06:09 PM
[ Content Deleted ]
Report Abuse
PartyTimeCc is not online. PartyTimeCc
Joined: 25 Aug 2009
Total Posts: 3193
15 Jul 2013 07:24 PM
Thanks sam.
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
15 Jul 2013 07:49 PM
script.Parent.MouseButton1Click:connect(function(mouse)
if game.Players.LocalPlayer:IsInGroup(13783) and game.Players.LocalPlayer:GetRankInGroup(13783) > 100 then
game.Players.LocalPlayer.TeamColor = BrickColor.new("Light blue")
end
end)

You need to make this a LocalScript because;
a. It uses LocalPlayer.
b. It doesn't cache if the user is in the group or not.

Also you wanted Player:GetRankInGroup, Role is the number next to the description of the role, the number between 0-255.

Felt like making it more efficient too.
Report Abuse
sam8985 is not online. sam8985
Joined: 12 Nov 2011
Total Posts: 582
15 Jul 2013 08:01 PM
We USED GetRankInGroup...
And it can't be a LocalScript, nub. It's in a GUI.
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
15 Jul 2013 08:02 PM
It can be a localscript.
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
15 Jul 2013 08:04 PM
>And it can't be a LocalScript, nub. It's in a GUI.
Yes it can., and gui's are already local considering their in PlayerGui

>It can be a localscript.
With my script it must be or it'll error, I'm using LocalPlayer, a local resource.
Report Abuse
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
15 Jul 2013 08:11 PM
@baheeg '2.How is "TeamColor" = "BrickColor"? you cant incompare them'
Research a little on the wiki before providing false information please.

TeamColor and BrickColor essentially are the same value types.
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
15 Jul 2013 08:11 PM
TeamColor is a BrickColor value.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 08:13 PM
[ Content Deleted ]
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