I am trying to make a part turn a random Color3 every few seconds using TweenService. But when I test the game the color doesn't change at all and there are no errors. Here is my script inside the part:
while true do
wait()
local color1 = math.random(0,255)
local color2 = math.random(0,255)
local color3 = math.random(0,255)
local ts = game:GetService("TweenService")
local p = script.Parent
local ti = TweenInfo.new(5,Enum.EasingStyle.Elastic,Enum.EasingDirection.In,99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999,true,0) --I set the number so high because I want it to always replay
local pp = {
Color = Color3.fromRGB(color1,color2,color3)
}
end
If someone could tell me what is wrong that would be greatly appreciated. Thanks in advance!
-PrismaticFruits

4 comments
Can you include the code where you are creating and playing the tween? I only see you making tween info and goals, but no tween.
Oh! That was the problem lol. I forgot to make a tween :/
:D Don't you love when that kind of stuff happens? You sit there staring at your code wondering why it won't work, and the moment you bring it to someone else they point out the fact that you didn't call a function or something.
XD