The server creates a ProximityPrompt every time a character is added, and this ProximityPrompt is special for some players. Hence, I fire a RemoteEvent to hide it from other players. However, clients can’t see the ProximityPrompt. Why is that? Here is my code:
local prompt = Instance.new("ProximityPrompt", chr:WaitForChild("HumanoidRootPart"))
task.wait()
for i, player in pairs(Teams.A:GetPlayers()) do
HidePrompt:FireClient(player, prompt) -- Nil for client
end
It works if I put a ProximityPrompt which already exists. But I need to clone them per character.
EDIT: I forgot to put player in the FireClient part but it is fixed in the Studio.
Yeah it’s not working for me either. Probably some replication issue because there’s quite a few similar devforum articles with no solutions.
Despite it not being passed by the remote, I can still see it in client-view in the explorer, so you could try to send the HumanoidRootPart instead of the proximity, then :FindFirstChild('ProximityPrompt') in the OnClientEvent function and change it there.
Edit: Nevermind, try adding a bit more time to your wait: