Howdy. I have an issue consider Billboard gui’s. When leaving the max range and returning it seems to change it’s position for what looks like no reason. I’ve tried setting the Offset to it’s original position within the workspace, when it is enabled although that doesn’t seem to fix my issue.
Here’s my script.
local part = game.Workspace.Items["Green Block"] -- the part I want to attach the Billboard GUI to local minrange = 5 local range = 25 -- the range of the proximity prompt local billboard = game.ReplicatedStorage:WaitForChild("InteractionAvailableUI"):Clone() -- create the Billboard GUI billboard.Parent = part -- attach it to the part billboard.Enabled = false -- set it to not visible by default billboard.Adornee = part print("script is working") local function checkDistance(player) print("checking position") local character = player.Character if not character then -- wait for the character to load return end local humanoidRootPart = character.HumanoidRootPart if not humanoidRootPart then -- wait for the HumanoidRootPart to load return end local distance = (part.Position - humanoidRootPart.Position).Magnitude if distance >= minrange then -- if the player is inside the range of the proximity prompt if not billboard.Enabled then -- if the Billboard GUI is not already enabled billboard.Enabled = true -- enable the Billboard GUI billboard.Adornee = part print("enabled") end else -- if the player is outside the range of the proximity prompt if billboard.Enabled then -- if the Billboard GUI is not already disabled billboard.Enabled = false -- disable the Billboard GUI print("disabled") end end end local player = game.Players.LocalPlayer while true do wait(.05) checkDistance(player) end
Here’s a video showcasing my problem.
Also, if anyone found a more practical way to check the player’s distance from the ui that would be greatly appriciated. Thanks for the help!