ProxityPrompts, Hiding them for localplayer over RemoteEvent

Hello, I am currently confused with proxityprompts.

script.Parent.PromptShown:Connect(function(plr)
	local a = true
	local char = plr.Character
	if char then
		a=char.Humanoid.Sit
	end
	local show = script.Parent.Parent.Occupant== nil and not a
	game.ReplicatedStorage.SpysEvents.ShowProxity:FireClient(plr,script.Parent,show)
end)

I am basically trying to achieve to hide the ProxityPrompt when player is already sitting. But somehow that’s not working.

Modify the .Enabled property of the ProximityPrompt to hide it (false = not shown).

That’s what I am doing in localscript, but somehow PromptShown isn’t doing anything.

Make sure this script is in the Client (Best place is inside of StarterPlayer.StarterPlayerScripts, but StarterGui works fine also.)

I put it in StarterCharacter and StarterGui.

But I found my solution using CollectionService.

1 Like