Only one player can see one ProximityPrompt

Hi,
So I have a ProximityPrompt parented to an attachment and I have problem because only one player can use it. I mean when the prompt is showing up for me, other players can’t see it. How can I fix that?

1 Like

Simple ill give you examples on server scripts and local ones.

Server script:

local plrSrvs = game:GetService("Players") -- gets the service called players!
local PP = script.Parent -- gets the proximity prompt

for i, plr in pairs(plrSrvs:GetPlayers()) do -- gets ALL the players single one by single one
	if plr.Name = "name you want and can be = to another string value" then -- checks if one of all the players is called the string
		PP.Visible = true -- sets it to true
	else -- if its anything else than string
		PP.Visible = false -- sets it to false
	end --ends the if statement
end -- ends loop

someway other in server script:

local plrSrvs = game:GetService("Players") -- gets the player service again
local PP = script.Parent -- gets the proximity prompt

plrSrvs.PlayerAdded:Connect(function(plr) -- checks if a player is added and gets him
	if plr.Name = "name you want and can be = to another string value" then -- checks the name you want and read the string
		PP.Visible = true -- sets the value
	else -- if its anything else
		PP.Visible = false -- sets the value
	end -- stops the if statement
end

in the local script:

local plrSrvs = game:GetService("Players") -- gets the Players server
local plr = plrSrvs.LocalPLayer -- gets the Local Player

if plr.Name = "name you want and can be = to another string value" then -- read this line but up
	PP.Visible = true -- sets the value
else -- if its anything else
	PP.Visible = false -- sets the value
end -- stops the if statement
1 Like

Is the attachment a child/sibling of the character? If so, are you implementing the ProximityPrompt using a Script or LocalScript? If none of these apply, is the property RequiresLineOfSight disabled? Sometimes it can get glitchy and messy if enabled.

1 Like

I didn’t mean to show the proximity prompt to only one person

No

Script (I thought that it can fix it by putting it in LocalScript but I want to be sure what’s exactly going on)

Disabled