Hello,
I have an overhead BillboardGui
healthbar system in my game, but there’s a problem where it clips behind player accessories.
I came up with an idea to stop this issue, but I am questioning whether it would impact the game’s performance.
- Enable
AlwaysOnTop
- Create a
LocalScript
that stores healthbarBillboardGui
objects in a table, and runs a loop, iterating through every healthbar in the table, that Raycasts every 0.1s from theCurrentCamera
to the position of theBillboardGui
. If there is something in the way of theRaycast
, then make the health bar invisible.
I need genuine feedback and help to consider if this would be a viable way to solve my issue.
I’ve tried repositioning the BillboardGui
but the results were janky and caused the healthbar to be offcentred.
Thanks