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: Not working, no errors

Previous Thread :: Next Thread 
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
07 Jun 2014 04:41 AM
local plrs = game.Players:GetPlayers()



for _, v in pairs(plrs) do
if v.TeamColor == BrickColor.new("Bright red") then
local re = v:FindFirstChild("leaderstats")
if re == true then
script.Parent.R.Value = re.KOs.Value
end
elseif v.TeamColor == BrickColor.new("Bright blue") then
local bl = v:FindFirstChild("leaderstats")
if bl == true then
script.Parent.B.Value = bl.KOs.Value
end
end
end

doesn't change the number values

'I am the greatest script in the realm. You can only hope to be as powerful of a script as I am, processing the world, bit by bit.' - Oysi 2014
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
07 Jun 2014 04:44 AM
local plrs = game.Players:GetPlayers()



for _, v in pairs(plrs) do
if v.TeamColor == BrickColor.new("Bright red") then
local re = v:FindFirstChild("leaderstats")
if re then
script.Parent.R.Value = re.KOs.Value
end
elseif v.TeamColor == BrickColor.new("Bright blue") then
local bl = v:FindFirstChild("leaderstats")
if bl then
script.Parent.B.Value = bl.KOs.Value
end
end
end

~The herp lerped a derp~
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
07 Jun 2014 04:53 AM
Still doesn't change the values

'I am the greatest script in the realm. You can only hope to be as powerful of a script as I am, processing the world, bit by bit.' - Oysi 2014
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
07 Jun 2014 05:40 AM
b1

'I am the greatest script in the realm. You can only hope to be as powerful of a script as I am, processing the world, bit by bit.' - Oysi 2014
Report Abuse
magoo8 is not online. magoo8
Joined: 25 Apr 2009
Total Posts: 1122
07 Jun 2014 05:44 AM
What exactly are you trying to do?
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
07 Jun 2014 05:47 AM
any output
and if you're running it once the server starts then it obviously won't work.
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
07 Jun 2014 07:15 AM
@mag

get KO's of each team and put the total into a number value

'I am the greatest script in the realm. You can only hope to be as powerful of a script as I am, processing the world, bit by bit.' - Oysi 2014
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
07 Jun 2014 07:17 AM
I fixed it, I added a while wait(0.01) do loop onto the in pairs loop, thanks for the help

'I am the greatest script in the realm. You can only hope to be as powerful of a script as I am, processing the world, bit by bit.' - Oysi 2014
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