So I've been working on a dialogue based tool giver but it doesn't seem to work. I don't know what could be wrong with it. I would love if someone could point out my errors.
local rs = game:GetService('ReplicatedStorage') local Coffee = rs:WaitForChild('Coffee') script.Parent.DialogChoiceSelected:connect(function(player, Dialog) if Dialog.Name == 'Dialog1' then if player.Backpack:FindFirstChild('Coffee')==nil then Coffee:Clone().Parent = player.Backpack end end end)