Notification won't send after proximity is triggered

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)
3 Likes

ok i fixed it by making a remoteevent so nvm

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.