How can I make my billboard gui be dependent on the character not the camera

Basically when I zoom out the billboard gui disappears and I don’t want that, I want the billboard gui to disappear if the roblox character gets too far from it.

1 Like

You’d have to probably setup a loop with character’s hrp distance from the billboard. Insert this in Local Script

local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local BillboardGui = "path"
local BillBoardPath = "path"

local distanceDisappear = 5

RunService.RenderStepped:Connect(function()
	local distance = (hrp.Position - BillBoardPath.Position).Magnitude
	if distance <= 	distanceDisappear then
		BillboardGui.Enabled = false
	else
		BillboardGui.Enabled = true
	end
end)

Remember that the code can get messy so I’d advise you to play around with CollectionService so you can keep everything clean when you want to apply that to more BillBoards

2 Likes

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