Proximity prompt doesn't work despite running on the same logic on a different thing

i have a locker, and a crate

the locker is very much openable because it has a proximity prompt
the hierarchy (in terms of classes) is kept the same in both models

however, the crate proximity prompt just doesn’t work at all and i don’t know why

this absolute behemoth of a code literally does not have any errors other than those absurd if statements in the middle (which do work!!!):

local plr = game:GetService("Players").LocalPlayer
local plrGui = plr.PlayerGui.ProximityPrompts

-- // SERVICES
local RS = game:GetService("ReplicatedStorage")
local PPS = game:GetService("ProximityPromptService")

local Prompt = RS:WaitForChild("Prompt")

PPS.PromptShown:Connect(function(prompt, inputType)
	if prompt.Style == Enum.ProximityPromptStyle.Default then return end

	local newPrompt = Prompt:Clone()
	newPrompt.Parent = plrGui
	newPrompt.Adornee = prompt.Parent

	local Popup = newPrompt:FindFirstChild("Popup")
	Popup:Play()

	for _,v in newPrompt:GetDescendants() do
		
		-- // I ABSOLUTELY APOLOGIZE FOR THIS HORRIBLE PIECE OF CODE BUT FINDFIRSTANCESTOR WOULDN'T WORK IN THIS SCENARIO
		-- // I am absolutely open to suggestions for a better and more optimal approach though
		
		if v.Name == "ObjectText" then
			if prompt.Parent.Parent:IsA("Tool") then
				v.Text = prompt.Parent.Parent.Name
			elseif prompt.Parent.Parent:IsA("MeshPart") then
				v.Text = prompt.Parent.Parent.Parent.Name			
			end

		elseif v.Name == "ActionText" then
			if prompt.Parent.Parent:IsA("Tool") then
				v.Text = "Take"
			elseif prompt.Parent.Parent:IsA("MeshPart") then
				v.Text = "Open"
			end
		end		
	end

end)

PPS.PromptHidden:Connect(function(prompt, inputType)
	local promptGui = plrGui:FindFirstChild("Prompt")

	if promptGui then
		local PopupClose = promptGui:FindFirstChild("PopupClose")
		PopupClose:Play()
		promptGui.Enabled = false
		PopupClose.Ended:Wait()
		promptGui:Destroy()
	else
		return
	end
end)

the hierarchy is literally kept the same:
image

1 Like

maybe the center of the lid is IN the crate. with this, try to make the lid a bit out of the crate

1 Like

try to turn off ProximityPrompt.RequiresLineOfSight, maybe?

1 Like

i have, i literally have

the style is set to custom aswell

1 Like

i guess i’ll try putting it in a seperate part

uhhhhhhhh that didn’t work!! character limit character limit ijdgfajiodfgoijdfgijodgfjiodfg

okay so apparently adding weld constraints worked, for some reason

as if anchored wasn’t enough (frown)