ProximityPrompt Problem

The proximityprompt is not going through the whole process, which means I can just stop early and it does nothing…
Anyone know how I can fix this problem?

It seems like you may be using ProximityPrompt.PromptButtonHoldBegan. This causes a connection the moment you press E.

You should be using ProximityPrompt.Triggered instead. This will only connect the function after you’ve held it for the assigned HoldDuration.

1 Like

local thisissoepic = game:GetService(“ProximityPromptService”)

thisissoepic.PromptButtonHoldEnded:Connect(function(object, plr)

local TS = game:GetService(“TweenService”)

I am using ended, would that work?

PromptButtonHoldEnded fires whenever you release the assigned KeyCode. So, it would be possible to open the door before the HoldDuration is finished by releasing the key early.

local thisissoepic = game:GetService(“ProximityPromptService”)

thisissoepic.ProximityPrompt.Triggered:Connect(function(object, plr)

local TS = game:GetService(“TweenService”)

or will it be

local thisissoepic = game:GetService(“ProximityPromptService”)

thisissoepic.ProximityPromptTriggered:Connect(function(object, plr)

local TS = game:GetService(“TweenService”)

Simply:

local thisissoepic = game:GetService(“ProximityPromptService”)
thisissoepic.PromptTriggered:Connect(function(Prompt, Player)
  -- do stuff
end)