I need to get the ViewportSize in order to convert from offset to scale, but ViewportSize is only returning 1,1 and not the pixel count of the screen.
I have tested this both on the client, the server, and on the clients in the client server testing environment
This is also inconsistent. In my game where I first realized this, ViewportSize returned the normal value when testing normally, but one on the client side of the server & clients testing environment. But in the game with nothing in it (and newer) it is returning 1,1 always.
I also found this older thread about viewport size in general, but it says that it will return the correct value on the client, which is not true (at least not anymore).
Wow that is very nice. I guess the inconsistency was because it was in a module script which was initialized in the testing environment after the ViewportSize change and else before. I will put the wait in a conditional as it will wait indefinitely if it correctly recieved the first time.
local ViewportsizeX = workspace.Camera.ViewportSize.X
if ViewportsizeX == 1 then
workspace.Camera:GetPropertyChangedSignal("ViewportSize"):Wait()
end
ViewportsizeX = workspace.Camera.ViewportSize.X