Why doesn't proximity prompt replicate correctly to clients?

A proximity prompt is created inside player characters and I want it to be disabled by default, so that people do not see it unless I enable it.

Some people are still able to see it, whilst others aren’t. It seems that it has something to do with the order in which players spawn.

Couldn’t find a similar issue, I’ve tried the code below where I create the proximity prompt and set Enabled to false, server-sided, but for some reason on some clients it is still visible and enabled.

local proxy = Instance.new("ProximityPrompt")
proxy.Parent = character.HumanoidRootPart.RootAttachment
proxy.Enabled = false
4 Likes

Have you tried turning off RequiresLineOfSight in the Proximity Prompt?

3 Likes

Is this a local script?

10*3 char max

2 Likes

I’ve omitted that part of code, but yes, in the full version it is turned off. The problem is that I can see locally that for one client the Enabled property is true, and for another it’s false, even though there are no scripts that change it.

2 Likes

The proximity prompt is created in a server script, not local script.

1 Like

Well also I’ll hope it’s not disabled through local script if so then there’s something to do with.

Can we get an extended version of the script? Like the parts where you disable and enable and stuffs. Is it possible?

3 Likes

Honestly this is the entirety of the relevant code:

local proxy = Instance.new("ProximityPrompt")
proxy.Enabled = false
proxy.KeyboardKeyCode = Enum.KeyCode.F
proxy.RequiresLineOfSight = false
proxy.HoldDuration = 10
proxy.Name = "ProximityPrompt"
proxy.Parent = character.HumanoidRootPart.RootAttachment

It is true that a localscript is supposed to manage enabling and disabling them, but I’ve disabled that localscript, in fact removed the chunk that interacted with the proximity prompts completely. The only usage of that proximity prompt in code is the code above where it’s created and instantly disabled.

I’ve noticed a pattern where it’s always the first person to spawn will see the proximity prompt of the second person to spawn, not other way round. This feels like a roblox-side issue.

1 Like

I’ve also previously encountered that deleting proximity prompts didn’t always delete them for every client. So I have to assume proximity prompts tend to replicate unreliably, and I’m now considering not using them at all because of this.

1 Like