Proximity prompts not hiding or showing

im trying to manage multiple proximity prompts but they wont show or hide. sometimes it works but sometimes it doesnt.

module script:

function module.PromptVisibility()
	local function claimTree(p)
		print("Tree was claimed by: " .. p.Name .. "!")
	end

	for _, tree in pairs(tree_folder:GetChildren()) do
		if tree:IsA("BasePart") then
			local claim_UI = tree:FindFirstChild("claim_UI")
			if claim_UI and claim_UI:IsA("BillboardGui") then
				for _, instance in pairs(tree:GetChildren()) do
					if instance:IsA("ProximityPrompt") then
						instance.PromptShown:Connect(function()
							claim_UI.Enabled = true
						end)

						instance.PromptHidden:Connect(function()
							claim_UI.Enabled = false
						end)
					end
				end
			end
		end
	end
end

local script in startercharacterscripts:

local tree_module = require(game.ReplicatedStorage:WaitForChild("tree_module"))
local p = game.Players.LocalPlayer

if p.Character then
	tree_module.PromptVisibility()
end
1 Like

It seems those two are the only ones not showing maybe try seeing if a part is un anchored or double check things

1 Like

Is RequiresLineOfSight off for all proximity prompts?

3 Likes

thats what I was thinking but its custom proximites

2 Likes

yes requireslineofsight is off. ty for ur response btw!!

1 Like

i may have to individually show / hide the prompts for each prompt but i think you should be able to do it for multiple right…? :triumph:

yes you should but since roblox studio is potato then I dont know :sob:.