GUI doesn't align properly with part in play test

I’m having a weird problem with the CurrentCamera in my script where my GUI doesn’t align with a part in play test despite it working perfectly fine in studio view. I’m running the exact same code in the command bar and it aligns in studio view, but not while I’m in the play test.

Studio view
Play test

The code ran in the command bar:

workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable workspace.CurrentCamera.CFrame = workspace.ComputerCamera.CFrame

I’ve checked the properties in both studio view and the play test, but they are the exact same. I don’t know if this is a studio problem or my own skill issue.

1 Like

I manually set the position and size to the absolute size of the frame inside the studio view. The solution isn’t perfect, but it looks better than it did before.

The fix

Hey, I know you did a little fix yourself, but you’re using Scale right? instead of offset?

Offset for now, the fix is definitely not perfect, but it works for now.

Hey, so Offset will move position on every single device, it’ll all be different. Depending on their device, so phones with smaller screens might be completely broken, I suggest changing over to Scale, Scale will keep the UI in the same spot and just re-size in that position for the screen size.

I’m aware of this problem, the current fix is temporary,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.