How do I disable all Proximity Prompts for the player?

I want to diable all proximity prompts for the player that triggers a proximity prompt so yeah
here is the code that I wrote

for i,v in pairs(game.Workspace:GetDescendants()) do
		if v:IsA("ProximityPrompt") then
			v.Enabled = false
	end
end

so this code does work but only in a server script and it does it to all players, if i put it in a local script it doesnt work idk why

2 Likes

make sure localscript is in playergui

Sure that works, Thanks

I just place the script in the server script service under a server script that places it in the player gui when the player enters and then the rest works with a remote event

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.