|
| 25 Jun 2015 12:03 PM |
So i created a GUI, and i wanted it so that the RANK INSIDE THE GROUP must be the same as a value to change teams.
function Click(mouse) -- leave this if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(2569837) then script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("White") script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0 end end
script.Parent.MouseButton1Down:connect(Click)
I think its on the lines of "GetRankInGroup(ID)" but i don't know how to do that stuff
|
|
|
| Report Abuse |
|
|
|
| 25 Jun 2015 12:23 PM |
function Click(mouse) if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(2569837) and script.Parent.Parent.Parent.Parent.Parent:GetRankInGroup(2569837) => 255 then -- change 255 to the rank number you want script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("White") script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0 else end end
script.Parent.MouseButton1Down:connect(Click) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 25 Jun 2015 12:27 PM |
that is just terrible. Let me help you out
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function() if player:IsInGroup(2569837) and player:GetRankInGroup(2569837) == 255 then player.TeamColor = BrickColor.new("White") player:LoadCharacter() end end) |
|
|
| Report Abuse |
|
|
| |
|