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: -- Needing Some Help --

Previous Thread :: Next Thread 
NOVA2525 is not online. NOVA2525
Joined: 14 Mar 2011
Total Posts: 1145
12 Jun 2013 05:20 PM
Yesterday I posted about a problem with this ambient changing script. This is what I was told to change it too:

function Color3(R, G, B)
return Color3.new(R/255, G/255, B/255)
end

game.Lighting.Ambient = Color3(50, 50, 50)
game.Lighting.OutdoorAmbient = Color3(50, 50, 50)

Now nothing happens at all and the Output says this:

15:19:50.971 - Workspace.Script:2: attempt to index global 'Color3' (a function value)
15:19:50.972 - Script "Workspace.Script", Line 2 - global Color3
15:19:50.972 - Script "Workspace.Script", Line 5
15:19:50.973 - stack end

Can someone please tell me what's wrong? Thanks!

-- Because It's Legal --
Report Abuse
NOVA2525 is not online. NOVA2525
Joined: 14 Mar 2011
Total Posts: 1145
12 Jun 2013 05:23 PM
bump





-- Because It's Legal --
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
12 Jun 2013 05:23 PM
I think you have to do for line 5:

game.Lighting.OutdoorAmbient = Color3.new(50, 50, 50)

Try that
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
12 Jun 2013 05:25 PM
You can't use Color3 as the functions name.
Just use Color
Report Abuse
NOVA2525 is not online. NOVA2525
Joined: 14 Mar 2011
Total Posts: 1145
12 Jun 2013 05:27 PM
@ToboboT it didn't work.
@dog456pop248 I'll try it.




-- Because It's Legal --
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
12 Jun 2013 05:28 PM
This worked for me:


function Color(R, G, B)
return Color3.new(R/255, G/255, B/255)
end

game.Lighting.Ambient = Color3.new(50, 50, 50)
game.Lighting.OutdoorAmbient = Color3.new(50, 50, 50)
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
12 Jun 2013 05:30 PM
Yes, and did it make the ambient and outdoor ambient somethign like (10000+,10000+,10000+)?
Report Abuse
NOVA2525 is not online. NOVA2525
Joined: 14 Mar 2011
Total Posts: 1145
12 Jun 2013 05:31 PM
Dog's worked for me. This is what I did:

function amb(R, G, B)
return Color3.new(R/255, G/255, B/255)
end
game.Lighting.Ambient = amb(50, 50, 50)
game.Lighting.OutdoorAmbient = amb(50, 50, 50)

Thanks!


-- Because It's Legal --
Report Abuse
NOVA2525 is not online. NOVA2525
Joined: 14 Mar 2011
Total Posts: 1145
12 Jun 2013 05:32 PM
Tobo when I tried making that it gave me some number over 10000.





-- Because It's Legal --
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
12 Jun 2013 05:33 PM
Oh ok.
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
12 Jun 2013 05:33 PM
Btw, you can't name the function Color3 becuase it's a datatype.
That would be like naming a function Vector3 or BrickColor
Report Abuse
NOVA2525 is not online. NOVA2525
Joined: 14 Mar 2011
Total Posts: 1145
12 Jun 2013 05:37 PM
Yeah it said something about global Color3 in the Output.





-- Because It's Legal --
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