Hello. I have recently been trying to make a game where once you talk to someone (using ROBLOX dialogue), it gives you an item based on your choice. Though I have run into some issues. The script is working in studio, yet not in-game. How can I fix this issue?
Script:
script.Parent.DialogChoiceSelected:Connect(function(player, choice)
if (choice == script.Parent.Choice1) then
local h = game.ServerStorage.Regular:Clone()
h.Parent = player.Backpack
end
if (choice == script.Parent.Choice2) then
local h = game.ServerStorage.Decaf:Clone()
h.Parent = player.Backpack
end
if (choice == script.Parent.Choice3) then
local h = game.ServerStorage.Espresso:Clone()
h.Parent = player.Backpack
end
end)
Script Location: http://prntscr.com/ijop70
Server Storage: http://prntscr.com/ijopdf
The game is Filtering Enabled.
If you need any extra info, feel free to message me on ROBLOX, my messages are open! https://www.roblox.com/messages/compose?recipientId=58651031

2 comments
try game:GetService("ServerStorage"):WaitForChild("Espresso")
Where? After line 10?