this is my script but it says Unable to assign property BrickColor. BrickColor expected, got Color3 at line 11, can u please fix the script so it tweens smoothly with brick color?
wait(3)
local r = {
Color3.fromRGB(254, 0, 0);
Color3.fromRGB(255, 127, 0);
Color3.fromRGB(255, 221, 1);
Color3.fromRGB(0, 200, 0);
Color3.fromRGB(0, 160, 199);
Color3.fromRGB(0, 55, 230);
Color3.fromRGB(129, 16, 210)}
local info = TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
script.Parent.BrickColor = r[1]
local i = 1
while true do
local tween = game:GetService("TweenService"):Create(script.Parent, info, {
BrickColor = r[i]})
tween:Play()
repeat wait() until tween.Completed
wait(0.1)
if i == #r then
i = 1
else
i = i + 1
end
end