Can you activate a proximity prompt with a script?

It’s simple, can you activate a proximity prompt with a local script? I tried looking on the api page but coudlnt find anything

1 Like

Yes, take a look at ProximityPrompt | Roblox Creator Documentation and ProximityPrompt | Roblox Creator Documentation.

No.

()()()()()()()()()()()()()()

I don’t think it’s possible. You activate the proximity prompt with a server script. Also I don’t see the point of activating it via a localscript. Can you explain your situation better?

1 Like

Yes you can! I used it in my game. You will need to put a LocalScript in StarterGui:
It is quite simple and very similar to a Server script.

local Prompt = workspace.Part.ProximityPrompt
Prompt.Triggered:Connect(function(player)
       --your script here :)
end)

I think the Proximity Prompt does what the name says, that is, it triggers a prompt by proximity to the player.
Why would you want to activate it without the player?
Because you can manually call the functions you create inside ProximityPromptService.PromptShown and others…

Yes, you can activate a proximity prompt by using a local script. You can put it anywhere as long as it works there (ServerStorage and ReplicatedStorage doesn’t allow scripts to run even if they’re not disabled).

If this isn’t what you’re talking about, then please give us more details.