Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How could I fix this dialog tool giver script? It doesn't give any tools.

Asked by 4 years ago

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)

Answer this question