Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Made a colorcorrection script and was wondering if i did it right?

So i tried to make it work, and i tested it and wanted to make sure if i scripted it right.

game.Lighting.ColorCorrection.TintColor.r(1)
wait(0.1)
game.Lighting.ColorCorrection.Tintcolor.r(4)
game.Lighting.ColorCorrection.Tintcolor.b(4)
repeat

edit : also tried it in studio, doesn't seem to be working. PS : LocalScript was used.


I'm a starter in scripting.

1 comment

0

You also refer to it as both "TintColor" and "Tintcolor"

1 answer

Hey, It's great that you're trying, and of course, its always a bummer if it doesn't work, right?

I'll help you get this working.

The following things are wrong with your script:

  1. You can not set r,g,b individualy
  2. You use 'repeat' at the bottom. This is actualy used as repeat -code- until -statement-

How to fix this:

On your first line, you should use while true do, this will make the code that comes after this, run in a loop until you call a break.

After that, you should change the colorcorrection using: game.Lighting.ColorCorrection.TintColor = Color3.new(0.25,0,0) -R,G,B on a scale of 0 to 1

Then you call a wait, wich you did perfectly!

wait(0.1)

After that, you want to change the color again. game.Lighting.ColorCorrection.TintColor = Color3.new(1,0,1) -R,G,B on a scale of 0 to 1

Then you close the while true do using the end keyword.

Your final code would be:

while true do
	wait(0.1)
	game.Lighting.ColorCorrection.TintColor = Color3.new(0.25,0,0)
	wait(0.1)
	game.Lighting.ColorCorrection.TintColor = Color3.new(1,0,1)
end

This will do the following:

Repeat constantly,

Wait 0.1 second

Change the color to 1/4 red, 0 green, 0 blue

Wait 0.1 second

Change the color to 1 red 0 green 1 blue (Purple)

Hope this helps you!

Happy scripting ;D

2 comments

0

Thanks !

0

Please accept this answer, if it helped you to a solution ;D

This discussion is preserved as it was. New answers, comments, and votes are closed.