Resize BillBoardGUI once parent resized

I would like to know how could I make a script that resizes a BillBoardGUI once its parent (a part) gets bigger. Here’s a picture:

Before:

After:

Thanks! :heart:

You could possibly try tweening a UIScale?

Yeah but how do I keep the proportion

You may be able to use UIAspectRatioConstraint | Documentation - Roblox Creator Hub.

Try resizing the UI when the part is changed or use the UIAspectRatioConstraint.

UDim2.new(partSize.X, 0, partSize.Y, 0)

I tried doing something like this:

local headTagGUI = script.Parent

headTagGUI.AncestryChanged:Connect(function(child, parent)
	local torso = parent:FindFirstChild("Torso")

	if torso then
		local torsoSize = torso.Size
		
		torso:GetPropertyChangedSignal("Size"):Connect(function()
			headTagGUI.Size = UDim2.new(
				headTagGUI.Size.X.Scale + 0.0005,
				0,
				headTagGUI.Size.Y.Scale + 0.0004,
				0
			)
		end)
	end
end)

However, if the part got a lot bigger in one time this would just update the GUI once

it was kinda tricky but I found the solution! so if you encountered the same problem you’re welcome!

use :ScaleTo (its for models btw)

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