Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isn't this ProximityPrompt firing?

I've been at this for almost an hour now and have no idea why it doesn't work.

-- clone is a model duplicated from serverstorage

for i, part in pairs(clone:GetDescendants()) do
	if part.Name == "primary" then
		local prompt = Instance.new("ProximityPrompt")
		prompt.Name = "BoxPrompt"
		prompt.RequiresLineOfSight = false
		prompt.HoldDuration = 4

		prompt.Parent = part
		
		prompt.Triggered:Connect(function(plr)
			local char = plr.Character
			print('triggered!!!!!!!!!!') -- doesn't print

			-- some more extra stuff that really doesn't matter
		end)
	end
end

I'm gonna go to sleep, it's almost 2am and I want to die.

2 answers

read the documentation on prompts

but it worked for me so im guessing is anything called primary? like with no captials. or is it a server or client thing? try switching it to a client or server. i used server.

not sure if this might help but this worked for me

I would say just keep it as ProximityPromt instead of promt and check the console since that where printed stuff goes

This discussion is preserved as it was. New answers, comments, and votes are closed.