It's placed inside a normal script and if I move it into a localscript it'll stop to work at all.
script.Parent.Dialog.DialogChoiceSelected:connect(function(player,choice)
if choice.Name == "yes" and player.Character.Spawn.flo.Value == true then
script.Parent.Dialog.one.yes.ResponseDialog = "I see, you go to the left then..."
player.Character.Health.Disabled = true
player.Character.Spawn.pass.Value = "left"
wait()
elseif choice.Name == "no" and player.Character.Spawn.flo.Value == true then
script.Parent.Dialog.one.no.ResponseDialog = "Lies! go the room in the left now!"
player.Character.Health.Disabled = true
player.Character.Humanoid.Health = 50
player.Character.Spawn.pass.Value = "left"
wait()
elseif choice.Name == "no" and player.Character.Spawn.flo.Value == false then
script.Parent.Dialog.one.no.ResponseDialog = "Good, you may pass"
player.Character.Spawn.pass.Value = "ahead"
wait()
elseif choice.Name == "yes" and player.Character.Spawn.flo.Value == false then
script.Parent.Dialog.one.yes.ResponseDialog = "If you say so"
player.Character.Spawn.pass.Value = "both"
wait()
end
end)

1 comment
https://scriptinghelpers.org/blog/it-works-in-studio-but-not-online