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: Comparison:One Line[HELP]

Previous Thread :: Next Thread 
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
05 Apr 2014 04:45 PM
if v.TeamColor == player.TeamColor and v ~= player then

This is where I encounter problems. I am trying to create names above players on the local players team. Its a regular script. The whole script is below:

player = script.Parent.Parent.Parent.Parent.Parent.Parent
print("1")
for i,v in pairs(_G.players) do
if v.TeamColor == player.TeamColor and v ~= player then
print("2")
local board = Instance.new("BillboardGui",player.PlayerGui)
board.AlwaysOnTop = false
board.Size = UDim2.new(1,0,1,0)
board.StudsOffset = Vector3.new(0,2,0)
board.Adornee = v.Character.Head
print("3")
local n = Instance.new("TextLabel",board)
n.BackgroundTransparency = 1
n.Position = UDim2.new(0.5,-50,0.5,-15)
n.Size = UDim2.new(0, 100,0, 30)
n.Font = "SourceSansBold"
n.FontSize = "Size14"
n.TextColor3 = Color3.new(0,1,0)
n.Text = ""..v.Name..""
print("4")
local board = Instance.new("BillboardGui",v.PlayerGui)
board.AlwaysOnTop = false
board.Size = UDim2.new(1,0,1,0)
board.StudsOffset = Vector3.new(0,2,0)
board.Adornee = player.Character.Head
print("5")
local n = Instance.new("TextLabel",board)
n.BackgroundTransparency = 1
n.Position = UDim2.new(0.5,-50,0.5,-15)
n.Size = UDim2.new(0, 100,0, 30)
n.Font = "SourceSansBold"
n.FontSize = "Size14"
n.TextColor3 = Color3.new(0,1,0)
n.Text = ""..player.Name..""
print("6")
end
end
script.Disabled = false
Report Abuse
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
05 Apr 2014 05:13 PM
if (v.TeamColor == player.TeamColor) and (v.Name ~= player.Name) then
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
05 Apr 2014 05:27 PM
Nope, still not getting past that line
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
05 Apr 2014 05:28 PM
No output
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
05 Apr 2014 05:53 PM
B
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
05 Apr 2014 07:44 PM
U
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
05 Apr 2014 08:52 PM
M
Report Abuse
Hibobb is not online. Hibobb
Joined: 18 Apr 2010
Total Posts: 2146
06 Apr 2014 09:35 AM
Time for a new thread
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