In my game I have two text labels with two scripts, the first text label shows the players viewport size and the second shows the size of a frame I created which has a scale size of 1,1.
You can see that the frame Y size is 36 pixels smaller than the viewport size (I’m playing in fullscreen). I was hoping someone could explain why this is happening.
You can test it yourself here:
Script for the frame size
local Players = game:GetService("Players")
local player = Players.LocalPlayer
while true do
wait()
local AbsX = player.PlayerGui.FrameGui.Frame.AbsoluteSize.X
local AbxY = player.PlayerGui.FrameGui.Frame.AbsoluteSize.Y
script.Parent.Text = AbsX .. " x " .. AbxY
end
Script for the viewport size
local Players = game:GetService("Players")
local player = Players.LocalPlayer
while true do
wait()
local ViewPortSize = workspace.Camera.ViewportSize
script.Parent.Text = ViewPortSize.X .. " x " .. ViewPortSize.Y
end