I need a way or some GuiObject that handles stretching the whole quest depending on the sizes and amount of the requirements inside (these green boxes)
so that the quest frame’s (Y) scale is set depending on whats in it, examples:
See here the quests scale perfectly to fit all of the difference amount of requirements
Heres what i got going so far. I have a ScrollingFrame holding all the Quests and its being scaled and positioned by a UIListLayout. Each Quest has a Requirements frame where a UIGridLayout handles all the requirement frames. I used different size modifiers to try and see what works best. But I dont know how to create the effect I mentioned.
Do I need to script the scaling?
I tried using UIListLayouts and UIGridLayouts but it confuses me how it works.
Using the “Offset” property seems to work but the issue is that it looks too big on mobile then.
So I need scaling
If i explained poorly i can provide more details or even the place with it if needed
The whole scaling part of GUIS just confuses me so much
local HowMuchThePlayerHas = workspace.Thing.Value
local Required = 10
while wait() do --Loop
script.Parent.Size = UDim2.new(HowMuchThePlayerHas/Required,0,1,0)
end
I would definitely not recommend this kind of scripting, while it does probably work in most cases it’s a much better idea to connect to RBXScriptSignals like from .Changed on a ValueBase. It’s especially a bad idea to use wait() in most cases and in which case task.wait() should be used
I was about to mention this.
So there arent GUI Objects that handle it? I need to script it specifically?
In a script I’d probably just update the size every time any values change yeah
If you’re wanting to scale the Y axis of the parent frame depending on the children, I would advise using a UIListLayout and either enabling AutomaticSize on the parent frame OR using a script to do it yourself like this:
local HowMuchThePlayerHas = workspace.Thing --Thing is an integer value
local Required = 10
local completedTask = false
HowMuchThePlayerHas.Changed:Connect(function(value)
script.Parent.Size = UDim2.new(HowMuchThePlayerHas/Required,0,1,0)
if value == Required then
completedTask = true
end
end)