How can i make the proximity prompt not show for the player who has it?

I have a script that creates a ProximityPrompt for the RootPart of all the users who have a rank of 30 or above in my group. It works fine. However, my problem is how to make the player who has the prompt to not able to see it, while everyone else can. I don’t want the proximity prompt to show on their screen constantly as it would be annoying. This is what I have so far

local players = game:GetService("Players")
local groupId = 12345
local minRank = 30 

	if player:GetRankInGroup(groupId) >= minRank then
		local proxPrompt ="ProximityPrompt")
		proxPrompt.Name = "prompt"
		proxPrompt.Parent = player.Character:WaitForChild("HumanoidRootPart")

			-- Do stuff here
1 Like

You can make it locally for that player, so that he won’t be able to see it but others can.
Try to access that prompt from a localScript and hide it for that player there.

1 Like

how would i do that? i can’t just make it a local script

1 Like

You can keep this script, create a local script now and through there make the player’s prompt invisible/disabled - this way, it’ll only be disabled for him only, and others will be able to see it.

local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local prompt = hrp:WaitForChild("prompt")

--do your stuff
1 Like

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