Local script enables proximity prompts to everyone on the server how to make it to the only players that have the item?

player = game.Players.LocalPlayer
Wirecutter = player.Items.Wirecutter

Wirecutter.Changed:Connect(function(value)
local elecboxes = workspace.Elecboxes
if value == true then
elecboxes.ElectricBox1.ProximityPrompt.Enabled = true
elecboxes.ElectricBox2.ProximityPrompt.Enabled = true
elecboxes.ElectricBox3.ProximityPrompt.Enabled = true
elecboxes.ElectricBox4.ProximityPrompt.Enabled = true
end
end)

player.ChildAdded:Connect(function(player)
local elecboxes = workspace.Elecboxes
if player.Items.Wirecutter.Value == true then
elecboxes.ElectricBox1.ProximityPrompt.Enabled = true
elecboxes.ElectricBox2.ProximityPrompt.Enabled = true
elecboxes.ElectricBox3.ProximityPrompt.Enabled = true
elecboxes.ElectricBox4.ProximityPrompt.Enabled = true
end
end)

The First Argument inside Triggered is the Player

ProxyPrompt.Triggered:Connect(function(Player)

end)

I made the Triggers separated for the proxyprompts
I just want to make a checker for the item if you own it you can see the proxyprompts

I fixed the scripts its works now

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