Making a BillboardGui fit on a part for a sizing system

I’m making a game similar to the old game “Mashables”. I’m currently trying to make the building system, but I can’t really figure out how I would attach the little sizing images to the parts.

Example of what I’m trying to achieve:
Screen Shot 2023-01-06 at 10.52.52 PM

What I have right now:
Screen Shot 2023-01-06 at 10.54.41 PM

I’m trying to use a BillboardGui for this, but it doesn’t fit right on the part whenever the size is changed.
Heres what I mean:
Screen Shot 2023-01-06 at 10.56.23 PM

How could I make the billboard fit on the part whenever the size of it is changed?

Should I use something else other than BillboardGui’s?

I think the easiest way to achieve this would be to use a ScreenGui. You can attach the ScreenGui to the part, and then put the BillboardGui inside the ScreenGui. That way, the BillboardGui will always be the same size as the ScreenGui, and you can resize the ScreenGui to fit the part.

its actually really simple. Create a “SphereHandleAdornment” and set the transparency to 0.2. Also set the Adornee to terrain and have the position of the adornment be where u want it on the part.

How would I detect if the spherehandleadornment has been clicked or not? I have already done that with the imagebutton in the billboardgui, but with this method, I don’t know how I would do that.

just see if the mouse is hovering over it thru math and then when the player does a mouse click u can assume he clicked.

Okay, so I’ve come across the ‘Handles’ instance, and for some reason it won’t detect any mouse drags or mouse presses in a script.

local scaleHandle = script.Parent
scaleHandle.MouseDrag:Connect(function(face, distance)
	print(face)
	print(distance)
end)
scaleHandle.MouseEnter:Connect(function(face)
	print(face)

end)
scaleHandle.MouseLeave:Connect(function(face)
	print(face)

end)
scaleHandle.MouseButton1Up:Connect(function(face)
	print(face)

end)
scaleHandle.MouseButton1Down:Connect(function(face)
	print(face)

end)

It is a server script, and it is not printing anything at all.

If you’re curious about what the Handles look like:
Screen Shot 2023-01-07 at 2.27.45 PM

I have figured out the problem, the Handles need to be parented to the PlayerGui. Then you must change the adornee to the supposed part you want it to be at.

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