Help with union color Tweening

So I am making a union strobe from blue to orange using Tweening. However I am not the best at Tweening so naturally my script failed. I don’t know what to fix because there was no error in the output, it just didn’t work. Can someone tell me what I did wrong so I can fix it?

local TweenService = game:GetService(“TweenService”)

local part = script.Parent.Color

local Orange = Color3.fromRGB(186, 115, 0)

local Blue = Color3.fromRGB(0, 141, 222)

local TI = TweenInfo.new(

30,

Enum.EasingStyle.Linear,

Enum.EasingDirection.InOut,

-1,

true,

0

)

local Anim = TweenService:Create(part, TI, Orange)

do Anim:Play() below local Anim = TweenService:Create(part, TI, Orange)

local Anim = TweenService:Create(part, TI, {
  Color = Orange
})
Anim:Play()
1 Like

@Synitx has the better one

This is what it should look like.

local TweenService = game:GetService("TweenService")

local part = script.Parent

local Orange = Color3.fromRGB(186, 115, 0)

local Blue = Color3.fromRGB(0, 141, 222)

local TI = TweenInfo.new(

	30,

	Enum.EasingStyle.Linear,

	Enum.EasingDirection.InOut,

	-1,

	true,

	0

)

local Anim = TweenService:Create(part, TI, {
	Color = Orange
})
Anim:Play()
1 Like

Unions have special property which makes them keep their color. The property is called UsePartColor

Make sure you set it to true
image

2 Likes