Is their a way to check if a player picked a Dialog Choice?

Hello! So I’m trying to make a Wizard NPC for my game Jawks! A ROBLXO Puzzle game, When the Player Picks the “I want the Potion!” then a potion will spawn!

Is This Possible?


Yes it’s possible, you would do something like this:

local Dialog = yourpathtothedialog
if Choice.Name == “TheNameOfTheDialog” then
–give the potion to the player


So something like this?

local SpeedPotion = game.ReplicatedStorage.SpeedPotion

local Dialog = script.Parent.Parent
	if Choice.Name == "GivePotion" then
		local SpeedPotionClone = SpeedPotion:Clone()
		SpeedPotionClone.Name = "Speed Potion"
		SpeedPotionClone.Parent = game.Workspace
		SpeedPotionClone.Position =, 27, -255.549)
		if Choice.Name == "DontGivePotion" then
1 Like

Yes ,and make sure it is in a local script
Edit: also make sure the local script is in StarterPlayer.StarterPlayerScripts or else it won’t work


I made it a local script and everything but it didn’t work, the potion doesn’t generate into the world at all, and the script for some reason doesn’t work

have you placed the script into starterplayerscripts

1 Like

Just Noticed your edit!

yes I have and re-made the path.

1 Like

It works thanks B>

now the wizard can officially give players potions!

1 Like

Yes, this is possible.

How I would go about this:

  1. Adding 2 bool values to the GUI
  2. Scripting the corresponding bool value to make it true when the player clicks either of the option GUIs
  3. Then making a script to do what ever I want when the corresponding bool value is true.

( You could also make an event, but I personally don’t know how to do this. )

As for the script that does stuff for when the bool value is true, you could make it:

  • Play a sound effect
  • Give a potion / tool
  • Enable particle effects
  • Play an animation

Hope this helps. :>

1 Like

Oh no! I was using the ROBLOX Dialog prompt and stuff! I know how to do this with UI anyway!

1 Like

I know it’s been a year but along with the if Choice.Name == "GivePotion" then you should put an and statement for if Choice.Name == "GivePotion" and Player == game.Players.LocalPlayer then otherwise the event will fire if ANYONE in the server selects that dialog.


Thanks, but you could have also messaged me that.

1 Like