How would I only have a “AlwaysOnTop” BillboardGui only show through specific parts.
I am using a BillboardGui for an effect that requires AlwaysOnTop, but id like to have it only show through specific parts.
If there is no solution my bad.
How would I only have a “AlwaysOnTop” BillboardGui only show through specific parts.
I am using a BillboardGui for an effect that requires AlwaysOnTop, but id like to have it only show through specific parts.
If there is no solution my bad.
It’s not clear what you mean by “only show through specific parts,” but you may be able to achieve your desired effect using the BillboardGui
object’s Size
and StudsOffset
properties.
The Size
property determines the dimensions of the BillboardGui
, and the StudsOffset
property determines the distance between the BillboardGui
and the object to which it is attached. By adjusting these properties, you can control the visibility of the BillboardGui
and make it appear as if it is only showing through specific parts of your model.
Here is an example of how you might use these properties to achieve your desired effect:
local billboard = Instance.new("BillboardGui")
billboard.Size = Vector2.new(10, 10)
billboard.StudsOffset = Vector3.new(0, 5, 0)
billboard.AlwaysOnTop = true
billboard.Parent = part
In this example, the BillboardGui
is attached to the part
object, and its dimensions are set to 10x10 studs. The StudsOffset
property is used to position the BillboardGui
5 studs above the part
object, which may help to make it appear as if it is only showing through specific parts of the model.
Keep in mind that the visibility of the BillboardGui
will also be affected by the camera’s angle and position, so you may need to experiment with different values for the Size
and StudsOffset
properties to achieve the exact effect you’re looking for.