Prop tools to inventory

Hello, So I’m trying to change up this script,


local tool = script.Parent -- Tool
local prox = tool.Handle.ProximityPrompt -- Proximity Prompt

prox.Triggered:Connect(function(player) -- When Proxmity Prompt is fired
	tool.Parent = player.Backpack -- Put the tool in the player's backpack
	prox.Enabled = false -- Disabled the Proximity Prompt
end)

It’s a script where you can pickup tools with a proximity prompt, I want to a prop tool instead of the actual tool being there. So that when you go by the prop tool and use the proximity prompt the prop tool dissapears and the tool goes in your inventory

It might be easy but im still learning

2 Likes

You’ll want to move your real tool to somewhere like ReplicatedStorage or ServerStorage and then in your script when the prompt is triggered you move the tool to the Players Backpack and destroy the fake/prop tool.

Here’s an example:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local tool = ReplicatedStorage.tool
local prop = script.Parent
local prox = prop.ProximityPrompt

prox.Triggered:Connect(function(player)
	prox.Enabled = false
	tool.Parent = player.Backpack
	prop:Destroy()
end)
1 Like