Title says it all
I'm trying to get the screen size (specifically, its width) in pixels for a calculation. ViewportSize gave me the answer for a short time (I think) but now just prints 1,1 which makes sense but does not suit my needs
If ViewportSize doesn't seem to be working for you, you can try use the ViewSizeX and ViewSizeY properties of the player's mouse. For example, to print the width of the screen in pixels, you could do something like:
local Mouse = game.Players.LocalPlayer:GetMouse() print(Mouse.ViewSizeX)
in a LocalScript.