I have a script that let's you pick a tool up from the replicated storage by holding e on a model. but you can get tons of that tool if you keep repeatedly pressing e, which can give you more than that 1 tool. i want to make it so you only can have 1 of that tool and can't get no more.
this is the script for the ProximityPrompt
local ReplicatedStorage = game:GetService ("ReplicatedStorage") local keyTool = ReplicatedStorage.Keycard
local KeyPart = script.Parent
KeyPart.ProximityPrompt.Triggered:Connect (function(player) local keyCopy = keyTool:Clone() keyCopy.Parent = player.Backpack
end)
please help!

5 comments
i feel this is a lot simpler
yeah thanks anyways! the other guy helped me already. but if his doesn't work ever, i'll use yours
You should probably use his solution, it's much more simple and can work across multiple parts in case you have multiple prompts that involve giving out your keycard.
on second thought, i tested your solution and it works the same, and it's a lot simpler like you said, and this guy^^^ is right. thanks!
np