This is a reduction of code/UI I’m using in a project.
There is code which resizes an inner container relative to the size of an outer container.
The contents of the inner container with size set to UDim2.new(1, 0, 0, 100) displays incorrectly such that it takes up less than 100% of the width of the container.
It was working fine last week and over the weekend until some point yesterday, and I didn’t make any code changes to this area of the code since. My code doesn’t touch the sizes of the inner contents so shouldn’t be an issue.
I’m not sure what is exactly causing this issue but I think it might be when a parent frame is resized while a child frame has Visible set to false. In the demonstration you will see the first prompt while resizing happens is fine, it being the latter ones which are affected.
Interestingly the Frame with the same parent, has X Scale set to 1 too, and is fine.
System Information: Windows 10 Desktop, AMD A10-5700, 16GB RAM, NVIDIA GeForce GT 1030.
Expected Behavior
I expect the TextLabel to take up 100% of the width of the parent.
The TextLabel is only taking up some of the space of the child container, I think it might be the total size before the parent size was changed but am not 100% sure on this.
Issue Area: Engine Issue Type: Display Impact: High Frequency: Constantly Date First Experienced: 2021-07-26 14:07:00 (+01:00) Date Last Experienced: 2021-07-27 20:07:00 (+01:00)
This is probably a studio bug, never seen this in-game. Resizing any of the widgets that consequently resize the canvas would fix the problem (probably spaghetti code not updating the UI):
This issue is also prevalent when you’re not playtesting, though less frequent (this issue could be solved by switching on and off the emulator).
In the last few hours, we’ve had 8 reports of issues in our live game that sound very similar to this. People saying that the text scaling is broken until they resize their game window.
I’m getting it in-game if you look at the place I linked.
I noticed the nudge resize too but forgot to mention in my rewritten report (wrote the bug report, went back a page to review the title and lost all my report: nightmare).
Seems there are various work arounds which are good. The project I’m working for isn’t aiming for release until September so hopefully a fix is applied before then!
I can confirm that the bug is caused when the size is adjusted while the parent is invisible. This code causes the bug every time. (The problem is not unique to text objects, all GuiObjects have the same problem)
Hey everyone, A ghetto fix (lol) I found that works is detecting when a gui instance becomes visible and changing the clipsdescendants property back and forth - this trick works with other properties as well but I chose clipdescendants:
local function FixSizingBug(GuiInstance)
if (GuiInstance:IsA("GuiObject")) then
local function OnVisibilityChanged()
local IsClipsDescendantsEnabled = GuiInstance.ClipsDescendants
GuiInstance.ClipsDescendants = not IsClipsDescendantsEnabled
GuiInstance.ClipsDescendants = IsClipsDescendantsEnabled
end
GuiInstance:GetPropertyChangedSignal("Visible"):Connect(OnVisibilityChanged)
OnVisibilityChanged()
end
end
for _, Child in ipairs(MainGui:GetChildren()) do
FixSizingBug(Child)
end
MainGui.ChildAdded:Connect(FixSizingBug)
--MainGui is a screen gui containing all of the gui instances
Can confirm this is happening to me too. I’ve recently been reopening my project to find that GUI elements size via scale appear far differently than how they are supposed to.
The bug is demonstrated in the first screenshot - the size of the play button is of scale {0.262,0.211} and appears almost invisible while the second screenshot shows the result of me after creating a brand new default frame instance into the ScreenGui in which all of the tiny elements were parented to. Just by inserting the frame - All GUI buttons displayed the correct size and scaled correctly. It is indeed still occurring across multiple games and has not been resolved.
Note that this issue has been present in both my original projects and team create group games to this day.
I’m having the same bug / problem but instead, with my UI instance being created by a script, at first it’s scaled at almost the minimum size when joining until screen is resized which updates the size to what it should be.
This applies for both Roblox studio and Roblox client.
Just experienced this bug as well and I noticed it happening on a new frame that I inserted into my game. I can’t seem to get it to go away and it’s very annoying because I’m not able to push an update to one of my games because of this since it cuts off the entire GUI.
I’ve recently started to experience this bug in-game and in-studio. It’s solved by resizing the window, but incredibly confusing for users. Can’t seem to find any workaround.
Hi,
I have this problem as well, this has been happening for almost 2 months.
I think that it is happening only to things that are not visible when the game starts and if you change something like size, position, transparency, etc. it will get fixed, but for some reason, I can’t fix it using a script.