When I fire this function, it returns the screen previous size. So for example, when I minimize the screen, instead of returning the current X value, it returns the previous one (being 1920, full screen)
And when I maximize the tab back to full screen, I get the small screen’s X, not the full screen value.
To my knowledge, GetPropertyChangedSignal should fire when the value has changed. So how can it possibly be returning old values?
local function SetSize()
print(Camera.ViewportSize.X)
end
Camera:GetPropertyChangedSignal("ViewportSize"):Connect(SetSize)