Why doesnt this tween the size of the gui object?
local LoadingScreen = game.StarterGui.Guis.LoadingScreen.ScreenGui local TweenService = game:GetService("TweenService") local ImageLabel = LoadingScreen.ImageLabel ImageLabel.Anchorpoint = Vector2.new(0.5,0.5) ImageLabel.Position = UDim2.new(0.5,-1,0.5,0) ImageLabel.Scale = UDim2.new(5,0,5,0) local EndScale = UDim2.new(0,0,0,0) wait(10) ImageLabel:TweenSize(UDim2.new(EndScale),nil,nil,3)
*The "Guis" object is a folder
You're attempting to tween the GUI sitting in the StarterGui, not the one which is cloned into your PlayerGui.
You can access the cloned GUI's for a player using game.Players.LocalPlayer.PlayerGui
Furthermore, your actual UDim2 is invalid.
UDim2 has 2 valid constructors:
UDim2.new ( number xScale, number xOffset, number yScale, number yOffset )
UDim2.new ( UDim x, UDim y )
You're trying to provide a UDim2, nil, nil and 3
. This doesn't match anything, also, nils are not allowed values inside UDim2 values. You must at least provide 0.