Filtering Proximity Prompts

Is there a way, that I can have a part in workspace, that contains a proximity prompt, and then on each client is a local script that when you are close enough for the prompt to be triggered, it checks if the player has permission, and will only display the prompt if the player has the permission. If not the prompt will not be displayed, and even more so, not block other prompts that might be nearby who have the same key binding.

How would I go about doing this?

Thanks.

In StarterPlayerScripts, you can use something like this:

<whenpermissionschanged>:Connect(function()
    if <permissions> then
        Prompt.Enabled = true
    else
        Prompt.Enabled = false
    end
end)

One way you could go about is having an array of allowed users and checking if the player is on said array.

local Player = game:GetService(“Players”).LocalPlayer
local Allowed = {“Player1”, “Player2”, “Player3”}
local Prompt = -- Location of your prompt

if table.find(Allowed, Player.Name) then
  Prompt.Enabled = true
else
  Prompt.Enabled = false