Hello, Im trying to make a UI gradient RGB loop, but I just want to loop one keypoint, the one that is in the middle (0.5), so I made a script but the error is that I cant tween this property, This is the script Im using:
local b = script.Parent -- "b" es el objeto UI Gradient que debe estar en el padre del script.
local TweenService = game:GetService("TweenService")
while true do
-- Creamos una serie de efectos de cambio de color usando TweenService
local colorSequence = {
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 0))
}),
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 155,0))
}),
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255,0))
}),
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 255,0))
}),
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 255,255))
}),
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 155,255))
}),
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0,255))
}),
ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0,155))
}),
Color3.fromRGB(255, 0, 155)
}
for _, color in ipairs(colorSequence) do
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
local tween = TweenService:Create(b, tweenInfo, { Color = color })
tween:Play()
wait(1)
end
end
Thanks for reading, I hope you can help me.