Hello. I was making changes to this gear giver script I found on the toolbox.
When getting the gear while it was in my inventory, it should send a error notification, but it won’t
Script:
local ToolName = {"classic_rocket"}
local Storage = game.ReplicatedStorage:WaitForChild("Tools")
local Part = script.Parent.Parent
local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function(Player)
if Player and Player.Character then
local Backpack = Player:WaitForChild("Backpack")
for i = 1, #ToolName do
local Tool = Storage:FindFirstChild(ToolName[i])
if Tool then
if Backpack:FindFirstChild(Tool.Name) then
game:GetService("StarterGui"):SetCore("SendNotification", {
Title = "Error";
Text = "You already have this rocket launcher equipped!"
})
else
Tool:clone().Parent = Backpack
end
end
end
end
end)