I am making a optimized MainMenu module and I am attempting to tween one of the objects but it prints
TweenService:Create failed because Instance is null - Client
In the output.
Here is the code:
local ArrowRight = CreateObject "TextButton" {
BackgroundTransparency = 1.0,
Size = UDim2.new(0.0, 30, 1.0, 0),
Position = UDim2.new(1.0, 0, 0.0, 0),
Font = Enum.Font.Arcade,
TextScaled = true,
TextColor3 = Color3.new(1.0, 1.0, 1.0),
Text = ">", Name = "RightArrow",
ZIndex = 3.0, Parent = ItemFrame}
local RightArrowOutline = CreateObject "UIStroke" {
Color = Color3.new(0.0, 0.0, 0.0), Thickness = 2.0,
Parent = ArrowRight}
TweenService:Create(RightArrow,
TweenInfo.new(1.0, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
{Position = UDim2.new(1.0, -40, 0.0, 0)}):Play()
The ArrowRight
is being created using a CreateObject
source code I found and it works beautifully and the object is there and not nil
when attempting to tween. I just don’t understand why it’s erroring and returning this in the output. Please help!