local function getDeviceScreenSize()
local X = game.Workspace.CurrentCamera.ViewportSize.X
local Y = game.Workspace.CurrentCamera.ViewportSize.Y
local Result = ('%d , %d'):format(X, Y)
return Result
end
local function getDeviceSize(Gui)
local size = Gui.AbsoluteSize
local X, Y = size.X, size.Y
local Result = ('%d , %d'):format(X, Y)
return Result
end
print(getDeviceScreenSize())
print(getDeviceSize(script.Parent))
Because it has different results, even though it’s so slight.
1228 , 635 - Client - LocalScript:15
1228 , 599 - Client - LocalScript:16