local plr = game.Players.LocalPlayer local PlayerGui = plr:WaitForChild('PlayerGui') - local ScreenGui = PlayerGui:WaitForChild('1stLoadingScreen') --ScreenGui local StartButton = ScreenGui.Frame.PlayLabel -- A TextLabel spawn(function() StartButton:GetPropertyChangedSignal('Size'):Connect(function() if StartButton.Size >= UDim2.new(0.1,0,0.1,0) then -- THIS IS WHERE THE PROblEM OCCURS print('it is past that ') end end) end) spawn(function() while wait(.1) do StartButton.Size = StartButton.Size + UDim2.new(.01,0,.01,0) end end)
StartButton.Size is a userdata value indeed, you cannot compare a UDim2 to it because it is not a number or integer, in which you can only compare those, same goes for stuff such as Vector3 and CFrame
A easy solution to this however, is to add
if StartButton.Size.X.Scale >= 0.1 and StartButton.Size.Y.Scale >= 0.1 then --DO THIS
Due to UDim2 not being a data TYPE of a, "Number," it does not know what to compare to, but if you index down to, "X," or, "Y," it will automatically see X or Y as a number, and not a UDim2