Alright, I’m not gonna paste the script here but here’s the deal.
I have a script that makes a proximity prompt on the server, parented to a players HumanoidRootPart. However, I don’t want the player to see their own ProximityPrompt. I belive, due to NetworkOwnership, when the player disables the proximity part on the client via the enabled property, it disables throughout all clients (Other clients can’t see the prompt). Any way to fix this?
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local hrp = character:WaitForChild("HumanoidRootPart",10)
if hrp then
local prompt = script.ProximityPrompt:Clone()
prompt.Parent = hrp
prompt.ActionText = player.Name
--prompt.LocalScript.Disabled = false
prompt.Triggered:Connect(function(player2)
if player2 == player then return end
local data = {}
data.gamepasses = {}
data.groups = {}
data.badges = {}
data.Name = player.Name
data.Age = player.AccountAge
data.UseId = player.UserId
data.Team = (player.Team.Name or "Unknown")
if player:FindFirstChild("Groups") then
for i,v in pairs(player.Groups:GetChildren()) do
if not tonumber(v.Name) then
data.groups[v.Name] = v.Role.Value
end
end
end
if player:FindFirstChild("Gamepasses") then
for i,v in pairs(player.Gamepasses:GetChildren()) do
if not tonumber(v.Name) then
data.gamepasses[v.Name] = v.Value
end
end
end
if player:FindFirstChild("Badges") then
for i,v in pairs(player.Gamepasses:GetChildren()) do
if not tonumber(v.Name) then
data.gamepasses[v.Name] = v.Value
end
end
end
if player2 then
game.ReplicatedStorage.PlayerData:FireClient(player2,data)
end
end)
end
end)
end)
Basically the above is the serverscript.
This is the LocalScript the is Parented to the Proximity Prompt
wait(1)
if script.Parent.ActionText == game.Players.LocalPlayer.Name then script.Parent.Enabled = false
end
Basically, I disable it on the client but then no other clients can see it.