I've made a tween script (taken from wiki) that is supposed to change the color gradually and randomly, but instead of that it keeps jumping from color to color then goes gradually and jumps again, can someone help?
math.randomseed(tick())
Tweening = false
local color3 = Color3.new(math.random(0,255),math.random(0,255),math.random(0,255))
if script.Parent.Random.Value == true then
if Tweening == false then
print("starting")
Tweening = true
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
5, -- Length of an interpolation
Enum.EasingStyle.Quad, -- Easing Style of the interpolation
Enum.EasingDirection.Out, -- Easing Direction of the interpolation
0, -- Number of times the sequence will be repeated
false, -- Should the sequence play in reverse as well?
0.5 -- Delay between each interpolation (including reverse)
)
-- A dictionary of property names, and the values they are trying to reach in the interpolation:
local propertyGoals =
{
Color = color3;
}
local tween = TweenService:Create(script.Parent,tweenInfo,propertyGoals)
-- Play the interpolation:
tween:Play()
Tweening = false
end
end
