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

I made a Cafe script which works in Studio but not in the actual game, any ideas?

Asked by 5 years ago
Edited 5 years ago

So, uhh, I made a cafe where a NPC is supposed to give you your order (send it to your backpack). While it works in studio mode, it won't work in the actual game. The script is:

script.Parent.DialogChoiceSelected:Connect(function(player, choice)
    if choice.Name == "Latte" then game.ServerStorage.Latte:Clone().Parent = player.Backpack end
    if choice.Name == "Decaf" then game.ServerStorage.Decaf:Clone().Parent = player.Backpack end
    if choice.Name == "Espresso" then game.ServerStorage.Espresso:Clone().Parent = player.Backpack end
    if choice.Name == "Regular" then game.ServerStorage.Regular:Clone().Parent = player.Backpack end
    if choice.Name == "Cappuccino" then game.ServerStorage.Cappuccino:Clone().Parent = player.Backpack end
    if choice.Name == "Water" then game.ServerStorage.Water:Clone().Parent = player.Backpack end
end)

Every tool is in ServerStorage, the choices and the tools are correctly named and I have no backpack wiping script of any sorts in the game (yet) and the output log is empty excepting for an error from another script that has nothing to do with it.

The script is a child of the Dialog instance along with the dialog choices, and the Dialog itself is a child of the NPC's head.

What did I do wrong?

0
Is it in a local script? mixgingengerina10 223 — 5y
0
Is it Filtering Enabled or Disabled? xXGokyXx 46 — 5y
0
It's in a server script, and the game is FE since all new templates are so. SirLuisFonsi 9 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Dialog.DialogChoiceSelected( Instance player, Instance dialogChoice ) does not work through Workspace.FilteringEnabled.

0
is there anything i can use to make it work in FE or should i just ditch the idea? SirLuisFonsi 9 — 5y
Ad

Answer this question