I have so far tried this, which is located in a group model, in a script:
local itemName = "FirstRoom" local player = game:GetService("Players").LocalPlayer script.Parent.UnlockDoor1.Triggered:Connect(function() if player.Character and player.Character:FindFirstChild(itemName) and player.Character[itemName]:IsA("Tool") then player.Character[itemName]:Destroy() end end)
First thing if you destroy the tool on the client, the server will still think it's there so use RemoteEvents. But since you're using ProximityPrompt we can get the PlayerObject with the ProximityPrompt.Triggered event because it comes with a parameter which is the player that triggered the ProximityPrompt.
Putting tools in StarterPack will replicate all of the service's contents into the client's Backpack.
ServerScript:
--[[ First, define your ProximityPrompt. Next, you want to connect the Triggered event to a function(The triggered Event comes with a parameter which is the player that triggered it). In the function, there is a variable and an if statement which will see if the player has the tool in the character or the backpack, If they do then it will destroy it. ]] local proximityPrompt = workspace.Part.ProximityPrompt local itemName = "FirstRoom" proximityPrompt.Triggered:Connect(function(playerThatTriggered) local tool = playerThatTriggered.Backpack:FindFirstChild(itemName) if tool or playerThatTriggered.Character:FindFirstChild(itemName) then tool:Destroy() end end)
I'd put this script in ServerScriptService