I’m trying to give a player a simple slice of pizza through dialog. The item in the workplace is named ‘Pizza’. I’ve used this script but it doesn’t seem to be working. What am I doing wrong?
local rs = game:GetService(‘ReplicateStorage’)
local Latte = rs:WaitForChild(‘Pizza’)
script.Parent.DialogChoiceSelected:connect(function(player, Dialog)
if Dialog.Name == ‘Dialog A’ then
if player.Backpack:FindFirstChild(‘Pizza’)== nil then
Latte:Clone().Parent = player.Backpack
end
end
local rs = game:GetService('ReplicateStorage')
local Latte = rs:WaitForChild('Pizza')
local remote = rs:WaitForChild("Remote")
script.Parent.DialogChoiceSelected:connect(function(player, Dialog)
if Dialog.Name == 'Dialog A' then
if not player.Backpack:FindFirstChild('Pizza') then
remote:FireServer(Latte)
end
end
end)