Vibe Mode Script not Working

Me and my friend are making a vibe game and i made a vibe mode gui. It used to work but now it doesnt. Here is the script:

tinty = game.Lighting.ColorCorrection.TintColor

script.Parent.Blue.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 164, 179)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(0, 164, 179)
end)

script.Parent.Blue2.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 0, 255)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(0, 0, 255)
end)


script.Parent.Green.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 68, 5)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(0, 68, 5)
end)

script.Parent.Orange.MouseButton1Click:Connect(function()
	tinty = Color3.new(189, 75, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(189, 75, 0)
end)


script.Parent.Pink.MouseButton1Click:Connect(function()
	tinty = Color3.new(214, 117, 255)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(214, 117, 255)
end)

script.Parent.Purple.MouseButton1Click:Connect(function()
	tinty = Color3.new(119, 0, 255)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(119, 0, 255)
end)


script.Parent.Red.MouseButton1Click:Connect(function()
	tinty = Color3.new(157, 0, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(157, 0, 0)
end)

script.Parent.Yellow.MouseButton1Click:Connect(function()
	tinty = Color3.new(185, 170, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(185, 170, 0)
end)

script.Parent.rESEY.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 0, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.new(255, 255, 255)
end)

help would be appriciated.

Are there any errors in the output?

ill check good idea

–30 charsss

It’s the first thing you’re supposed to do if a script does not work…

absolutely nothing came up…

First issue I spot with this is that you’re using the Color3.new constructor with numbers between 0 and 255. The Color3.fromRGB constructor has this functionality, Color3.new takes floats from 0 to 1.

1 Like

Is it a local script or a script?

local script

–30 charrs
returned tru ok

doing that did not work :frowning:

Ah I see your second issue, your variable named ‘tinty’ is being assigned to a Color3 however this doesn’t assign to the actual property - just the variable.

I recommend you define a variable for the ColorCorrection and assign the var.TintColor where you assign tinty.

So then would it look like this?

clr = game.Lighting.ColorCorrection
tinty = clr.TintColor

script.Parent.Blue.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 164, 179)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRGB(0, 164, 179)
end)

script.Parent.Blue2.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 0, 255)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRGB(0, 0, 255)
end)


script.Parent.Green.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 68, 5)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRG(0, 68, 5)
end)

script.Parent.Orange.MouseButton1Click:Connect(function()
	tinty = Color3.new(189, 75, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRG(189, 75, 0)
end)


script.Parent.Pink.MouseButton1Click:Connect(function()
	tinty = Color3.new(214, 117, 255)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRG(214, 117, 255)
end)

script.Parent.Purple.MouseButton1Click:Connect(function()
	tinty = Color3.new(119, 0, 255)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRG(119, 0, 255)
end)


script.Parent.Red.MouseButton1Click:Connect(function()
	tinty = Color3.new(157, 0, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRG(157, 0, 0)
end)

script.Parent.Yellow.MouseButton1Click:Connect(function()
	tinty = Color3.new(185, 170, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRG(185, 170, 0)
end)

script.Parent.rESEY.MouseButton1Click:Connect(function()
	tinty = Color3.new(0, 0, 0)
	game.Workspace.PutAllLightSourcesHere.Lantern3.Bulb.Color = Color3.fromRG(255, 255, 255)
end)

alrighty ill try that

–30 char

PERFECT! but one problem. the tint color makes my eyes burn out and i need to know how to make it just like a small impression. Should i make a new topic or does anyone know how to fix this?

why using Color.new(num,num,num) instead of Color.FromRGB(num,num,num)
Your code have many errors as, Color.FromRG!?

lol thank u i didnt see that!!!