Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you get the size of a screen?

I am trying to position an element at the left side of the screen by using the screen size, Is there any way to get the size of a device?

1 comment

0

You wanna fill the screen using GUIs? cos your question is a bit too vague.

1 answer

✓ Accepted answer

You're making it kind of vague with what you exactly want to do seems like and xy problem. If you're trying to get the size of a GUI then you could simply check it's size, the 2nd and 4th values will give you it's size in pixels if that's what you want. If you want the position you could also just check the position of the GUI.

But if you actually need the size of the screen, I'm assuming you mean resolution, then you should use Mouse.ViewSizeY and Mouse.ViewSizeX

local Mouse = Player:GetMouse()
local ScreenSizeX =Mouse.ViewSizeX
local ScreenSizeY = Mouse.ViewSizeY

Sorry if I misunderstood what you're asking you didn't really make it clear.

2 comments

0

Thanks but the link is wrong

0

Sorry fixed it

This discussion is preserved as it was. New answers, comments, and votes are closed.