Here's my code:
local tool = game.Lighting["Regular Island Coffee"]
local dialog = script.Parent.Parent.Coffee
dialog.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.coffee) then
if player.Backpack.tool == nil then
tool:Clone().Parent = player.Backpack
end
end
end)
If anyone would tell me how to fix this script, much would be appreciated.
If you click "Coffee" in the DialogChoice, it would give you a "Regular Island Coffee" tool.
If the Coffee is not in the backpack, put it in the backpack and clones. If the Coffee is in the backpack, it does nothing.
I was watching a Youtube Tutorial on this, I followed this exactly with a few changes. Here's the link: https://www.youtube.com/watch?v=QcoL43S4m5w

5 comments
Thanks so much!
Oops, problem! I followed all the steps in your Script (not LocalScript). Is there any errors? Also, I fixed that one place.
Did you receive any errors or did it just break? (Errors are listed in the output tab if you didn't know)
Just to confirm, make sure your using RemoteEvent's not BindableEvent's. (Similar name, completely different purposes)
Uh oh! I found a major error in the LocalScript, lemme fix it.