Proximity Prompt not working/ away from model

I have been looking for hours for a solution and I am still so utterly confused. Please note that I’ve used a free script found online and have no experience in scripting. My aim is to use a proximity prompt on models so people are able to view what the models are wearing. For some models it works perfectly fine, but for others its either: the proximity prompt is far away from the model or not showing at all. With click detector is shows most of the outfits but for some it still doesnt show all. The script is placed in ReplicatedStorage, I have tried enabled and disabled line of sight, as well as putting it in a part but still nothing works. Here is part of the script which includes the Proximity Prompt:

for _, OutfitModel in pairs(OutfitsFolder:GetChildren()) do
	-- Set the display distance type to none
	local Humanoid = OutfitModel:WaitForChild('Humanoid')
	Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
	local Prox = Instance.new('ProximityPrompt')
	Prox.MaxActivationDistance = 25
	Prox.Parent = OutfitModel
	Prox.HoldDuration = 0.5
	Prox.ObjectText = "TextHere"
	Prox.ActionText = "TextHere"
	
	

	-- View outfit if an OutfitModel is pressed
	Prox.Triggered:Connect(function()
		local HumanoidDescription = Humanoid:WaitForChild('HumanoidDescription')
		OutfitViewerController:ViewOutfit(HumanoidDescription)
	end)
	
end

Click Detector:

for _, OutfitModel in pairs(OutfitsFolder:GetChildren()) do
	-- Set the display distance type to none
	local Humanoid = OutfitModel:WaitForChild('Humanoid')
	Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
	
	-- Create a new proximity prompt
	local ClickDetector = Instance.new('ClickDetector')
	ClickDetector.MaxActivationDistance = 25
	ClickDetector.Parent = OutfitModel
	

	
	
	-- View outfit if an OutfitModel is pressed
	ClickDetector.MouseClick:Connect(function()
		local HumanoidDescription = Humanoid:WaitForChild('HumanoidDescription')
		OutfitViewerController:ViewOutfit(HumanoidDescription)
	end)

end

I will be so grateful if someone helps me solves this. I want to be able to use proximity prompt, so players can view the outfit, on all models with no problems.

where exactly is the proximity prompt parented to?

The proximity prompt was only made in the script, I’d assume it is parented to OutfitModel inside the folder Outfits. However, I think the problem was caused by the plugin I was using to load in the models. After trying a different plugin, I noticed that when I test the game, it works perfectly fine every time, and if you check properties you’ll notice that there a proximity prompt automatically placed there, (not there when you check in studio, properties). I appreciate you answering back to my post, thank you

if the prompt is parented to a model, it usually doesn’t appear properly. try attaching it to an attachment or a part.

yes, i have tried that unfortunately it didnt work, my solution for now was just using a different plugin because that seemed to solve the problem.

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