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: :|

Previous Thread :: Next Thread 
iamcamronkiller is not online. iamcamronkiller
Joined: 21 Mar 2010
Total Posts: 1152
27 Jan 2014 01:12 AM
I am having trouble with scripting and basically, I can't figure out how to write a script so that if you are in a certain group and have a certain rank you spawn on a team
Report Abuse
DarkComa is not online. DarkComa
Joined: 01 Apr 2011
Total Posts: 11679
27 Jan 2014 01:59 AM
GetRankInGroup
Report Abuse
iamcamronkiller is not online. iamcamronkiller
Joined: 21 Mar 2010
Total Posts: 1152
27 Jan 2014 11:35 AM
How would the script look?
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
27 Jan 2014 11:38 AM
Uhh...

on player entered
is player in group Id
if player group id = 139030309301 then
palyer team = RED HAHAHA
end
end)
end)

About like that but with real functions and things.
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
27 Jan 2014 11:41 AM
Change the values to meet your needs;
--------------------------------

groupID = 0
teamColor = "Bright blue"
rank = 0
game.Players.PlayerAdded:connect(function(nP)
if nP:GetRankInGroup(ID_HERE) == rank then
nP.TeamColor = BrickColor.new(teamColor)
end
end)

~Master Scripter, ROBLOX Wiki Writer, 5 year veteran and potato
Report Abuse
iamcamronkiller is not online. iamcamronkiller
Joined: 21 Mar 2010
Total Posts: 1152
27 Jan 2014 01:12 PM
And if they weren't in the group they would spawn on the spawn not mentioned in scripts?
Report Abuse
iamcamronkiller is not online. iamcamronkiller
Joined: 21 Mar 2010
Total Posts: 1152
27 Jan 2014 02:12 PM
+ When it says rank = could I put like multiple ranks like
rank = 1, 2, 3, 4
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
27 Jan 2014 02:17 PM
No, to do that you would:

groupID = 0
teamColor = "Bright blue"
rank = 0
rank2 = 0
rank3 = 0
rank4 = 0
game.Players.PlayerAdded:connect(function(nP)
if nP:GetRankInGroup(ID_HERE) == rank then
nP.TeamColor = BrickColor.new(teamColor)
elseif nP:GetRankInGroup(ID_HERE) == rank2 then
nP.TeamColor = BrickColor.new(teamColor)
elseif nP:GetRankInGroup(ID_HERE) == rank3 then
nP.TeamColor = BrickColor.new(teamColor)
elseif nP:GetRankInGroup(ID_HERE) == rank4 then
nP.TeamColor = BrickColor.new(teamColor)
end
end)

~Master Scripter, ROBLOX Wiki Writer, 5 year veteran and potato
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