My definetion does not work

Hi, I think my definition of these things are wrong:

    local Cheeseburger = player.Backpack:FindFirstChild("Cheeseburger") or player.Character:FindFirstChild("Cheeseburger")
	local PillBottle = player.Backpack:FindFirstChild("PillBottle") or player.Character:FindFirstChild("PillBottle")
	local BloxyCola = player.Backpack:FindFirstChild("BloxyCola") or player.Character:FindFirstChild("BloxyCola")

the player is from the build in function:

script.Parent.Triggered:Connect(function(player)
end)

and script.parent is a proximityprompt
and its in a normal script

I do not think the script is the problem because I looked through it and I do not have a typo on the names pls help

local Cheeseburger = player.Backpack:FindFirstChild("Cheeseburger")
local PillBottle = player.Backpack:FindFirstChild("PillBottle")
local BloxyCola = player.Backpack:FindFirstChild("BloxyCola")

is the best way to do it.

Are you getting any errors in your console?

1 Like

no, there is no error in the console