im trying to make an animation for a frame but there’s this error that shows up
TweenService:Create property named ‘BackgroundColor’ cannot be tweened due to type mismatch (property is a ‘int’, but given type is ‘double’)
here’s my script :
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
ts:Create(script.Parent.Frame,ti,{BackgroundColor = 1}):Play()
BackgroundColor is not a valid property of a frame, it’s either BackgroundColor3 or BackgroundTransparency that you’re looking for here. If you’re wanting to change the background color to a new color, you’ll have to specify a valid Color3 as seen below.
-- Background color
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0)
tweenService:Create(script.Parent.Frame, tweenInfo, { BackgroundColor3 = Color3.fromRGB(255, 255, 255) }):Play()