Please correct me if this is the wrong category.
So I noticed that when you get far away from a billboard GUI it gets bigger(Well it doesnt actually get bigger. It just looks that way cause the frame inside of it does not shrink)
So how would I make it so the billboard GUI shrinks when you get far away from it?
Wigglyaa
(Wigglyaa)
May 5, 2023, 5:21pm
#2
Use scale instead of offset when setting the BillboardGui’s size.
It then sets the size in studs rather than pixels.
2 Likes
Try using Scale instead of offset. if that doesn’t give you the desired effect,
You can try making a custom billboard GUI. here’s some sample code:
get the magnitude (distance) from the player’s head, rootpart, etc and the point in your world.
If your script is a localscript and inside the gui:
local frameToScale = script.Parent.Frame
local worldPoint = game.Workspace.guiPoint --can be an object, vector3, etc. Just make sure that you convert to a vector3 at some point
local maxDistance = 50 --The distance at which the gui stops getting bigger
local maxSize = 0.9 --The maximum size of the frame in either direction (scale)
--get the player…
1 Like
use scale instead of offset, like this (in properties it’s like this: {1, 0},{1, 0}
, in luau, it’s like this: UDim2.FromScale(1, 1)
)
1 Like
system
(system)
Closed
May 26, 2023, 12:31am
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.