Hello, I am trying to remove a part by touching another and the part locally but the part I touched gets deleted on the server
Simpler way to explain: I touch part B, it destroys part A to the person who touched it, part B is deleted on the server
Script on Part B
script.Parent.Touched:Connect(function(hit) script.Parent:Destroy() end)
Local script on Part B
function onTouch(part) game.ReplicatedStorage.PINK:FireServer() end
script.Parent.Touched:connect(onTouch)
Local script I have on Part A
game.ReplicatedStorage.PINK.OnClientEvent:Connect(function() script.Parent:Destroy() end)
It destroys part B but doesn't destroy part A

5 comments
Works perfectly!
Worked thanks!
Your welcome! please accept my answer so everyone can see!
You should place it in StarterPlayerScripts over StarterGui,
ok