How do i make an proximity prompt visable to a specific player

how do i make an proximity prompt visable to a specific player

3 Likes

depends on how you want to do it

2 Likes

You can disable the proximity prompt on the server and enable it on the client of that player.

3 Likes

how do i do it bc i dont know alot of that

2 Likes

I think it’s best if you know like how to use scripts and what scripts are used for and the properties of an object.
In your case you need a local script but like i said, you need to specify how you want it to make it possible like after a part got touched or something got clicked and so on

2 Likes

like i want it to make it that after you calim an shop it will get your name wich i already done but make it that only you can see the unclaim proximity prompt

2 Likes

like how do you claim the shop? Via a proximityprompt, a touched event, a remote/bindable event etc?

2 Likes

with a proximityprompt that claim it and store the name with an string value

2 Likes

Is the ProximityPrompt triggered on the client or server?

2 Likes

wait client is local script and server is an regular script?

2 Likes

yes it is
text filler text filler text filler

2 Likes

then its an server i did the claim and unclaim with the same script

1 Like

but i want it that only the owner of the claim can see the unclaim proximity prompt

1 Like

I think claiming it on the server is alright but lets add some things
I hope this works!

Script: (the one you use to claim)

local ProximityPrompt = script.Parent.ProximityPrompt -- change the path if needed
-- create a remoteEvent in ReplicatedStorage and Name it however you want, this is just a test
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("Unclaim")-- change this if needed

ProximityPrompt.Triggered:Connect(function(playerWhoTriggered)
	RemoteEvent:FireClient(playerWhoTriggered)
	ProximityPrompt.Enabled = false
	-- rest of your code
end)

Local Script: (must be in StarterPlayer/CharacterScripts or StarterGui (preferable)

-- add the path to ProximityPrompt and a :WaitForChild if its in workspace
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("Unclaim")-- change this if needed
RemoteEvent.OnClientEvent:Connect(function()
	ProximityPrompt.Enabled = true
	ProximityPrompt.ActionText = "Unclaim"
	-- rest of your code
	
end)

And if you want to be really sure, add a print in triggered event

print(playerWhoTriggered.Name)

i will try this later but thenk you

well im not using an remote event to claim and unclaim lol

Well else the server cant communicate with the client