New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 14 days 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