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: Really Easy (I think)

Previous Thread :: Next Thread 
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
27 Apr 2014 12:35 PM
Hi,

I'm trying to add points to players on a certain team at the end of a round, however, it's now working!

Output says "Attempt to perform arithmetic on Points, a userdata value."

The script is here:

local players = game.Players:GetChildren()
for _, Player in pairs (Game.Players:GetPlayers()) do
if Player.TeamColor == BrickColor.new("Bright red") then
Player.leaderstats.Points = Player.leaderstats.Points + 50
end
end

I don't know why it's happening...
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
27 Apr 2014 12:37 PM
Player.leaderstats.Points.Value*

#nerdsunited
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
27 Apr 2014 12:38 PM
Here is word-for-word output: attempt to perform arithmetic on field 'Points' (a userdata value).
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
27 Apr 2014 12:39 PM
Oh my gosh. I am a nubcaik. My bad, guys.
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