|
| 13 May 2013 02:42 PM |
GroupID = 838470
game.Players.PlayerAdded:connect(function(player) if player:IsInGroup(GroupID) then local char = player:findFirstChild("Character") if char ~= nil then local torso = char:findFirstChild("Head") if head ~= nil then local gui = Instance.new("BillboardGui") gui.Parent = head gui.Adornee = head gui.AlwaysOnTop = true gui.ExtentsOffset = Vector3.new(0, 3, 0) gui.Size = UDim2.new{0.3, 0}, {0.5, 0} local text = Instance.new("TextLabel") text.Parent = gui text.Position = UDim2.new{0.5, 0}, {0, 0} text.Size = UDim2.new{0.5, 0}, {0.3, 0} text.ZIndex = 10 text.TextColor3 = Color3.new(0, 0, 128) text.BackgroundTransparency = 1 if player:GetRankInGroup(GroupID) == 10 then text.Text = "[LR] Recruit" elseif player:GetRankInGroup(GroupID) == 20 then text.Text = "[LR] Private" elseif player:GetRankInGroup(GroupID) == 30 then text.Text = "[LR] Corporal" elseif player:GetRankInGroup(GroupID) == 40 then text.Text = "[LR] Specialist" elseif player:GetRankInGroup(GroupID) == 50 then text.Text = "[LR] Sergeant" elseif player:GetRankInGroup(GroupID) == 60 then text.Text = "[LR] Lieutenant" elseif player:GetRankInGroup(GroupID) == 70 then text.Text = "[MR] Trainee" elseif player:GetRankInGroup(GroupID) == 80 then text.Text = "[MR] Major" elseif player:GetRankInGroup(GroupID) == 90 then text.Text = "[MR] Officer" elseif player:GetRankInGroup(GroupID) == 100 then text.Text = "[MR] Diplomat" elseif player:GetRankInGroup(GroupID) == 110 then text.Text = "[MR] Colonel" elseif player:GetRankInGroup(GroupID) == 120 then text.Text = "[MR] Trainer" elseif player:GetRankInGroup(GroupID) == 130 then text.Text = "[HR] Brigadier" elseif player:GetRankInGroup(GroupID) == 140 then text.Text = "[HR] General" elseif player:GetRankInGroup(GroupID) == 150 then text.Text = "[HR] Prime General" elseif player:GetRankInGroup(GroupID) == 160 then text.Text = "[HR] Supreme General" elseif player:GetRankInGroup(GroupID) == 170 then text.Text = "[HR] Emperor" elseif player:GetRankInGroup(GroupID) == 180 then text.Text = "[HR] Vice Commander" elseif player:GetRankInGroup(GroupID) == 255 then text.Text = "[HR] Commander" end end end end end)
This won't create a BillboardGui like it's supposed to... no output either.
Thanks for your help! |
|
|
| Report Abuse |
|
|
|
| 13 May 2013 02:48 PM |
fail nub, change local torso to local head and try it.
Soup's on, everybody! ~LuaLearners Writer~ |
|
|
| Report Abuse |
|
|
|
| 13 May 2013 02:48 PM |
| LOL thanks... I'm lazy and stupid today. |
|
|
| Report Abuse |
|
|
|
| 13 May 2013 02:50 PM |
Hey, I tried that and it didn't work.
New script:
GroupID = 838470
game.Players.PlayerAdded:connect(function(player) wait() if player:IsInGroup(GroupID) then local char = player:findFirstChild("Character") if char ~= nil then local head = char:findFirstChild("Head") if head ~= nil then local gui = Instance.new("BillboardGui") gui.Parent = head gui.Adornee = head gui.AlwaysOnTop = true gui.ExtentsOffset = Vector3.new(0, 3, 0) gui.Size = UDim2.new{0.3, 0}, {0.5, 0} local text = Instance.new("TextLabel") text.Parent = gui text.Position = UDim2.new{0.5, 0}, {0, 0} text.Size = UDim2.new{0.5, 0}, {0.3, 0} text.ZIndex = 10 text.TextColor3 = Color3.new(0, 0, 128) text.BackgroundTransparency = 1 if player:GetRankInGroup(GroupID) == 10 then text.Text = "[LR] Recruit" elseif player:GetRankInGroup(GroupID) == 20 then text.Text = "[LR] Private" elseif player:GetRankInGroup(GroupID) == 30 then text.Text = "[LR] Corporal" elseif player:GetRankInGroup(GroupID) == 40 then text.Text = "[LR] Specialist" elseif player:GetRankInGroup(GroupID) == 50 then text.Text = "[LR] Sergeant" elseif player:GetRankInGroup(GroupID) == 60 then text.Text = "[LR] Lieutenant" elseif player:GetRankInGroup(GroupID) == 70 then text.Text = "[MR] Trainee" elseif player:GetRankInGroup(GroupID) == 80 then text.Text = "[MR] Major" elseif player:GetRankInGroup(GroupID) == 90 then text.Text = "[MR] Officer" elseif player:GetRankInGroup(GroupID) == 100 then text.Text = "[MR] Diplomat" elseif player:GetRankInGroup(GroupID) == 110 then text.Text = "[MR] Colonel" elseif player:GetRankInGroup(GroupID) == 120 then text.Text = "[MR] Trainer" elseif player:GetRankInGroup(GroupID) == 130 then text.Text = "[HR] Brigadier" elseif player:GetRankInGroup(GroupID) == 140 then text.Text = "[HR] General" elseif player:GetRankInGroup(GroupID) == 150 then text.Text = "[HR] Prime General" elseif player:GetRankInGroup(GroupID) == 160 then text.Text = "[HR] Supreme General" elseif player:GetRankInGroup(GroupID) == 170 then text.Text = "[HR] Emperor" elseif player:GetRankInGroup(GroupID) == 180 then text.Text = "[HR] Vice Commander" elseif player:GetRankInGroup(GroupID) == 255 then text.Text = "[HR] Commander" end end end end end) |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 13 May 2013 02:54 PM |
GroupID = 838470
game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character if player:IsInGroup(GroupID) then local char = player.Character if char then local head = char:findFirstChild("Head") if head ~= nil then local gui = Instance.new("BillboardGui") gui.Parent = head gui.Adornee = head gui.AlwaysOnTop = true gui.ExtentsOffset = Vector3.new(0, 3, 0) gui.Size = UDim2.new(0.3, 0, 0.5, 0) local text = Instance.new("TextLabel") text.Parent = gui text.Position = UDim2.new(0.5, 0, 0, 0) text.Size = UDim2.new(0.5, 0,0.3, 0) text.ZIndex = 10 text.TextColor3 = Color3.new(0/255, 0/255, 128/255) text.BackgroundTransparency = 1 if player:GetRankInGroup(GroupID) == 10 then text.Text = "[LR] Recruit" elseif player:GetRankInGroup(GroupID) == 20 then text.Text = "[LR] Private" elseif player:GetRankInGroup(GroupID) == 30 then text.Text = "[LR] Corporal" elseif player:GetRankInGroup(GroupID) == 40 then text.Text = "[LR] Specialist" elseif player:GetRankInGroup(GroupID) == 50 then text.Text = "[LR] Sergeant" elseif player:GetRankInGroup(GroupID) == 60 then text.Text = "[LR] Lieutenant" elseif player:GetRankInGroup(GroupID) == 70 then text.Text = "[MR] Trainee" elseif player:GetRankInGroup(GroupID) == 80 then text.Text = "[MR] Major" elseif player:GetRankInGroup(GroupID) == 90 then text.Text = "[MR] Officer" elseif player:GetRankInGroup(GroupID) == 100 then text.Text = "[MR] Diplomat" elseif player:GetRankInGroup(GroupID) == 110 then text.Text = "[MR] Colonel" elseif player:GetRankInGroup(GroupID) == 120 then text.Text = "[MR] Trainer" elseif player:GetRankInGroup(GroupID) == 130 then text.Text = "[HR] Brigadier" elseif player:GetRankInGroup(GroupID) == 140 then text.Text = "[HR] General" elseif player:GetRankInGroup(GroupID) == 150 then text.Text = "[HR] Prime General" elseif player:GetRankInGroup(GroupID) == 160 then text.Text = "[HR] Supreme General" elseif player:GetRankInGroup(GroupID) == 170 then text.Text = "[HR] Emperor" elseif player:GetRankInGroup(GroupID) == 180 then text.Text = "[HR] Vice Commander" elseif player:GetRankInGroup(GroupID) == 255 then text.Text = "[HR] Commander" end end end end end) |
|
|
| Report Abuse |
|
|
|
| 13 May 2013 02:59 PM |
@above;
Still doesn't work... Thanks though.. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 13 May 2013 03:02 PM |
| Are you trying it online..? |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 May 2013 03:05 PM |
I tried it online.
THANKS. :D
btw you rock :3 |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 13 May 2013 03:05 PM |
| I think you need to test online to use that. I forget. |
|
|
| Report Abuse |
|
|
| |
|