How to make tool pickup with ProximityPrompt

How to make tool pickup with ProximityPrompt! | Useful for FPS games

1) Make a part inside workspace | game.Workspace
Name it however you want
image

2) Make a ProximityPrompt inside the Part
image

**3) Make a Server Script inside the ProximityPrompt
image

4) Make a tool and put it in ReplicatedStorage | game.ReplicatedStorage
In our case is Pistol
image

5) Lets script!

script.Parent.Triggered:Connect(function(plr) -- Detects if the ProximityPrompt is triggered
		game:GetService("ReplicatedStorage"):WaitForChild("YourTool"):Clone().Parent = plr.Backpack -- Change "YourTool" to your tool name!
end)

6) Trigger Ended
You can make the part destroy whenever the player triggered the part and got the tool.
You dont need to make it.

script.Parent.TriggerEnded:Connect(function() -- Checks if the ProximityPrompt is triggered
	script.Parent.Parent:Destroy() -- Destroys the part
end)

If you need any help feel free to ask!

7 Likes

You didn’t define plr btw in part 5.

2 Likes

oh woops, thanks for letting me know