How do I tween a part's color infintely and each color is something diffrent

local part = script.Parent
local TweenService = game:GetService("TweenService")
local TweenFo = TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,-1,false)
local Red = math.random(0,255)
local Blue = math.random(0,255)
local Green = math.random(0,255)
local tweenCreate = TweenService:Create(part,TweenFo,{["Color"] = Color3.fromRGB(Red,Blue,Green)})



tweenCreate:Play()

This script above me just chooses one color and keeps tweening that same color. So How would I make this part change diffrent colors with TweenService.

local part = script.Parent
local TweenService = game:GetService('TweenService')
local TweenFo = TweenInfo.new(2,Enum.EasingStyle.Linear)

while true do
	local t = TweenService:Create(part, TweenFo, {Color = Color3.new(math.random(), math.random(), math.random())})
	t:Play()
	t.completed:Wait()
end
2 Likes

Dont need to do this,he has those three varaibles,use them

I know your not talking to me but Wdym

Copy his script,his script is correct

So why’d you say not to use it then?

It is because he can use his original script varaibles.lesser space for coding,easier to know which one it is

paetemc2’s version is way simpler and gets the job done just as well. Also, the Red, Blue, and Green values in OP’s post are unnecessary and can just be avoided in favour for being placed in the properties that should be tweened, which is what paete did.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.