Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago
Edited 7 years ago

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.

0
You also refer to it as both "TintColor" and "Tintcolor" metropolish30 6 — 7y

1 answer

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 years ago

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

0
Thanks ! Deploy_Coffee 7 — 7y
0
Please accept this answer, if it helped you to a solution ;D RubenKan 3615 — 7y
Ad

Answer this question