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 » Scripters
Home Search
 

Color3 Issue

Previous Thread :: Next Thread 
NefariusNightmare is not online. NefariusNightmare
Joined: 01 Aug 2013
Total Posts: 94
10 Nov 2015 06:03 PM
I could really use quick help with this.
This is the script.
while true do
wait(1)
for x = 10,0,-0.1 do
wait(0.01)
script.Parent.SurfaceLight.Color = script.Parent.SurfaceLight.Color + Color3.new(1,0,0)
end
for x = 10,0,-0.1 do
wait(0.01)
script.Parent.SurfaceLight.Color = script.Parent.SurfaceLight.Color - Color3.new(1,0,0)
end
end
After testing it out extensively, I've come out stumped. Everytime I got this error on line 4.
"attempt to perform arithmetic on field 'Color' (a userdata value)"
It's really simple, but for some reason it wouldn't work no matter what I tried.
Report Abuse
XanthicDragon is not online. XanthicDragon
Joined: 19 Jul 2011
Total Posts: 2780
10 Nov 2015 06:05 PM
Two issues:

Color3 is not like Vector3 - You can't add two Color3 values. You'd have to create a new Color3 from SurfaceLight.Color.R, SurfaceLight.Color.G, and SurfaceLight.Color.B

Secondly, Color3 is from 0 to 1, where 0 is 0 in RGB scale and 1 is 255 in RGB scale



"Jet Fuel Doesn't Melt Dank Memes" --xCMCxSCOOTALOOx
Report Abuse
NefariusNightmare is not online. NefariusNightmare
Joined: 01 Aug 2013
Total Posts: 94
10 Nov 2015 06:17 PM
I got a little lost there... can you show me an example?
Thanks for trying at least!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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