Tool wont work when prompt is triggered

Im making an ending for my game and I need to check if the tool (grapejuice) is in there backpack since its sometimes stored in SERVERSTORAGE. and when the prompt is triggered the grapejuice will destroy and the NPC (max) head becomes purple

local Max = script.Parent.Parent
local Humanoid = script.Parent.Parent.Humanoid
local Prompt = script.Parent
local liquid = game.ReplicatedStorage.ZaneItems.GrapeJuice

Prompt.Triggered:Connect(function(player)
	if player:FindFirstChild("Backpack") and player.Backpack:FindFirstChild(liquid) then
		liquid:Destroy()
		end
end)

Thanks for your time!

you need to look for an item that’s named “GrapeJuice”

Prompt.Triggered:Connect(function(Player)
  local Juice = Player.Backpack:FindFirstChild("GrapeJuice")
  -- What you did: 
  -- Player.Backpack:FindFirstChild(game.ReplicatedStorage.ZaneItems.GrapeJuice)
  if Juice then
    Juice:Destroy()
  end
end)

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