|
| 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
|
  |
| Joined: 01 Apr 2011 |
| Total Posts: 11679 |
|
| |
|
|
| 27 Jan 2014 11:35 AM |
| How would the script look? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 27 Jan 2014 02:12 PM |
+ When it says rank = could I put like multiple ranks like rank = 1, 2, 3, 4 |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|