Fabwabs
(Fabwabs)
May 31, 2020, 5:18pm
#1
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.
uhi_o
(HAT3UBERALLES)
May 31, 2020, 5:20pm
#2
Are there any errors in the output?
uhi_o
(HAT3UBERALLES)
May 31, 2020, 5:21pm
#4
It’s the first thing you’re supposed to do if a script does not work…
Fabwabs
(Fabwabs)
May 31, 2020, 5:22pm
#5
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
uhi_o
(HAT3UBERALLES)
May 31, 2020, 5:23pm
#7
Is it a local script or a script?
Fabwabs
(Fabwabs)
May 31, 2020, 5:24pm
#8
local script
–30 charrs
returned tru ok
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.
Fabwabs
(Fabwabs)
May 31, 2020, 6:41pm
#11
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)
Fabwabs
(Fabwabs)
May 31, 2020, 6:57pm
#14
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!?
Fabwabs
(Fabwabs)
June 1, 2020, 4:51pm
#18
lol thank u i didnt see that!!!