Getting an error when trying to tween a Background color

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I’m trying to tween the background color of one of my gui’s

  1. What is the issue? Include screenshots / videos if possible!

I keep getting an error like this:

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve looked around and tried different tweeting methods but I keep getting the same error

Here’s the code that errors:

	
	local Part = script.Parent.SideBar
	local TweenService = game:GetService("TweenService")
	--local Tween = TweenService:Create(Part, TweenInfo.new(1), {BackgroundColor =  Color3.fromRGB(0, 0, 0)}) 
	----Tween:Play()

	local goal = {}
	goal.BackgroundColor = Color3.fromRGB(31, 128, 189)

	local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear)

	local tween = TweenService:Create(Part, tweenInfo, goal)

	tween:Play()
	

As you can see I tried a different way of tweeting but It didn’t change anything.

Try changing to BackgroundColor3

GuiObject.BackgroundColor is deprecated GuiObject | Roblox Creator Documentation

2 Likes