I am building a school’s auditorium’s control room. I am trying to make the buttons change the color of the lights on the stage.
However, I have come across an issue, where certain RGB color codes will not tween properly. Instead of changing values, it appears to massively multiply the values/add numbers to it. I don’t know how to explain it, just see the below pictures.
I literally have no idea how to fix it, I’ve searched for solutions or any similar situations on devforum and I can’t seem to find any post regarding this.
Let me know if I did anything wrong or if this is really a bug. Feel free to suggest edits/changes or any optimizations to my script, as I am not that advanced.
***NOTE: The color for the PointLights are the one experiencing the issue.***
local cyan = script.Parent:WaitForChild("Cyan")
local toothpaste = script.Parent:WaitForChild("Toothpaste")
local hot_pink = script.Parent:WaitForChild("Hot pink")
local parsley_green = script.Parent:WaitForChild("Parsley green")
local bright_violet = script.Parent:WaitForChild("Bright violet")
local cind = script.Parent.Parent.Parent:WaitForChild("ColorIndicator")
local stagelights = script.Parent.Parent.Parent.Parent:WaitForChild("StageLights")
for i, att in pairs(script.Parent.Parent.Parent.Parent.StageLights:GetChildren()) do
cyan.ClickDetector.MouseClick:Connect(function()
cyan.ClickDetector.MaxActivationDistance = 0
game:GetService("TweenService"):Create(stagelights,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.fromRGB(4, 175, 236)}):Play()
game:GetService("TweenService"):Create(att.PointLight,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.new(4, 175, 236)}):Play()
wait(2)
cyan.ClickDetector.MaxActivationDistance = 6
end)
toothpaste.ClickDetector.MouseClick:Connect(function()
toothpaste.ClickDetector.MaxActivationDistance = 0
game:GetService("TweenService"):Create(stagelights,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.fromRGB(0, 255, 255)}):Play()
game:GetService("TweenService"):Create(att.PointLight,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.new(0, 1, 1)}):Play()
wait(2)
toothpaste.ClickDetector.MaxActivationDistance = 6
end)
hot_pink.ClickDetector.MouseClick:Connect(function()
hot_pink.ClickDetector.MaxActivationDistance = 0
game:GetService("TweenService"):Create(stagelights,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.fromRGB(255, 0, 191)}):Play()
game:GetService("TweenService"):Create(att.PointLight,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.new(255, 0, 191)}):Play()
wait(2)
hot_pink.ClickDetector.MaxActivationDistance = 6
end)
parsley_green.ClickDetector.MouseClick:Connect(function()
parsley_green.ClickDetector.MaxActivationDistance = 0
game:GetService("TweenService"):Create(stagelights,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.fromRGB(44, 101, 29)}):Play()
game:GetService("TweenService"):Create(att.PointLight,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.new(44, 101, 29)}):Play()
wait(2)
parsley_green.ClickDetector.MaxActivationDistance = 6
end)
bright_violet.ClickDetector.MouseClick:Connect(function()
bright_violet.ClickDetector.MaxActivationDistance = 0
game:GetService("TweenService"):Create(stagelights,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.fromRGB(107, 50, 124)}):Play()
game:GetService("TweenService"):Create(att.PointLight,TweenInfo.new(2,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{Color = Color3.new(107, 50, 124)}):Play()
wait(2)
bright_violet.ClickDetector.MaxActivationDistance = 6
end)
end
while true do
cind.BrickColor = stagelights.BrickColor
wait()
end

