-
What do you want to achieve?
The tool giver isn’t giving the player the tool after it’s been removed by the player’s inventory. I’d like to only remove the tool from the player’s backpack, not the entire game. -
What is the issue?
Here’s a video link: Trash & Tool Issue on Vimeo
So the proximityprompt is used to give the player the tool, but when the player recycles the tool, then when they go to use the tool giver again, the tool isn’t being given to them anymore. -
What solutions have you tried so far?
I can’t figure out what the problem is… I’ve tried to see if the tool is destroyed within ServerStorage but I’m not able to see the items in ServerStorage when testing my game. There also isn’t anything on the DevForum that has been related to my specific question/issue (that I could find after searching for hours).
local prp = script.Parent
local pizza = game.ServerStorage["Pupperoni Pizza"]
prp.Triggered:Connect(function(player)
pizza:Clone()
pizza.Parent = player.Backpack
game.StarterPlayer["Pup Pizza"].Value = true
prp.Enabled = false
wait(20)
prp.Enabled = true
end)
player = game.Players.LocalPlayer
backpack = player.Backpack
script.Parent.yes.MouseButton1Click:connect(function(clicked)
if backpack then
for _,v in ipairs(backpack:GetChildren()) do
if v:IsA('Tool') then v:remove() end
end
script.Parent:TweenPosition(UDim2.new(0.5, -165, -1, 0), "In", "Back", 1)
wait(1)
script.Parent:Destroy()
end
end)
script.Parent.no.MouseButton1Click:connect(function(clicked)
script.Parent:TweenPosition(UDim2.new(0.5, -165, -1, 0), "In", "Back", 1)
wait(1)
script.Parent:Destroy()
end)
Please let me know if you need any more information or additional explanation, I truly appreciate your help!