Xegic
|
  |
| Joined: 29 Jan 2016 |
| Total Posts: 2105 |
|
|
| 29 Mar 2017 05:34 PM |
Trying to make it so my group high ranks can do events as soon as they're promoted so I don't have to keep adding people to a list.
if msg == ":TDM" then x = Instance.new("Team", game.Teams) x.TeamColor = BrickColor.new("Bright blue") x.Name = "Blue team" x.AutoAssignable = false wait(1) game.Lighting.Sword1:clone().Parent = game.Teams["Blue team"] wait(1) randomisePlayers()
Appreciated!
~ Commander Xegic of TKC | "Learn, Adapt, Conquer" | |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 05:37 PM |
game.Player.PlayerAdded:connect(function(Player) if Player:GetRankInGroup >= WHATEVERRANKVALUE then -- stuff end end)
print(string.rep("Lit",5)) |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 05:38 PM |
local groupid = groupid here
game.Players.ChildAdded:Connect(function(player) if player:GetRankInGroup(groupid) == "NameHere" then --do stuff end end) |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 05:40 PM |
OOPS i forgot the brackets.
print(string.rep("Lit",5)) |
|
|
| Report Abuse |
|
|
Xegic
|
  |
| Joined: 29 Jan 2016 |
| Total Posts: 2105 |
|
|
| 29 Mar 2017 05:41 PM |
if player:GetRankInGroup(groupid) == "200" then
Would this allow ranks higher than this to still be able to do the commands?
~ Commander Xegic of TKC | "Learn, Adapt, Conquer" | |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 05:42 PM |
There is no need for a string btw.
print(string.rep("Lit",5)) |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 05:43 PM |
If you want higher ranks if Player:GetRankInGroup(id) >= 200 then
print(string.rep("Lit",5)) |
|
|
| Report Abuse |
|
|
Xegic
|
  |
| Joined: 29 Jan 2016 |
| Total Posts: 2105 |
|
|
| 29 Mar 2017 05:44 PM |
Ah, I see. Thank you. I'll test it out now.
~ Commander Xegic of TKC | "Learn, Adapt, Conquer" | |
|
|
| Report Abuse |
|
|
Xegic
|
  |
| Joined: 29 Jan 2016 |
| Total Posts: 2105 |
|
|
| 29 Mar 2017 05:45 PM |
| game.Player.PlayerAdded:connect(function(Player) if ############################## ## ### then for _,v in pairs(admin) do if nP.Name == v then nP.Chatted:connect(function(msg) if msg == ":TDM" then x = Instance.new("Team", game.Teams) x.TeamColor = BrickColor.new("Bright blue") x.Name = "Blue team" x.AutoAssignable = false wait(1) game.Lighting.Sword1:clone().Parent = game.Teams["Blue team"] wait(1) randomisePlayers() end end) Should this work? ~ Commander Xegic of TKC | "Learn, Adapt, Conquer" | |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 05:45 PM |
200 isn't supposed to be a string. It's supposed to be a number.
So just remove the quotation marks from 200 and it should work.
Script:
local groupid = groupid here
game.Players.ChildAdded:Connect(function(player) if player:GetRankInGroup(groupid) >= 200 then --do stuff end end) |
|
|
| Report Abuse |
|
|
Xegic
|
  |
| Joined: 29 Jan 2016 |
| Total Posts: 2105 |
|
|
| 29 Mar 2017 05:45 PM |
game.Player.PlayerAdded:connect(function(Player) if Player:GetRankInGroup(id) >= NUMBERAMOUNT then for _,v in pairs(admin) do if nP.Name == v then nP.Chatted:connect(function(msg) if msg == ":TDM" then x = Instance.new("Team", game.Teams) x.TeamColor = BrickColor.new("Bright blue") x.Name = "Blue team" x.AutoAssignable = false wait(1) game.Lighting.Sword1:clone().Parent = game.Teams["Blue team"] wait(1) randomisePlayers() end end)
~ Commander Xegic of TKC | "Learn, Adapt, Conquer" | |
|
|
| Report Abuse |
|
|
Xegic
|
  |
| Joined: 29 Jan 2016 |
| Total Posts: 2105 |
|
|
| 29 Mar 2017 05:46 PM |
Excluding the previous admin thing I had there.
~ Commander Xegic of TKC | "Learn, Adapt, Conquer" | |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2017 05:47 PM |
| :clone() is deprecated use :Clone() |
|
|
| Report Abuse |
|
|