proximityPrompt not dissabling when triggered

im trying to make a proximityPromt dissapear when triggered but it doesnt, i tried puting a print but it didnt show up… how can i make it work?

local prompt = script.Parent

local function onPromptTriggered(player)
	prompt.Enabled = false
end

prompt.Triggered:Connect(onPromptTriggered)

if those three backticks are actually in the code, then you got an error so remove them

if they arent, what script is this? local or server

the backticks arent in the code, its a local script

do you have any other scripts that are changing the .Enabled value?
is the parent of the script actually a proximity prompt?
are you sure the script is running? local scripts can only run under the player’s character, under player scripts, and under player gui

LocalScript’s wont run if not parented to the player, so either switch it for a normal Script or move the LocalScript to StarterGui or StarterPlayerScripts.

LocalScripts can’t work in Workspace. Create a ServerScript with RunContext Client. And paste that code.

1 Like

but wont it dissable the proximity to everyone in the server?

if you want it to disable for everyone in the server then change your script from being a local script to a server script

if not, just move your client script to a location it can run

No.
charactercharactercharacter