How to initiate a script from dialogue chose

  1. What do you want to achieve? Keep it simple and clear!
    So i need initiate a script from dialogue
  2. What is the issue? Include screenshots / videos if possible!
    for some reason that don’t works
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Nothing helped

My code:

local Dialog = script.Parent
Dialog.DialogChoiceSelected:connect(function(Player, Choice)
	if (Choice == script.Parent.TradeD) then
		local Clicks = Player.leaderstats.Clicks
		local Money = Player.leaderstats.Money
		Money.Value += (Clicks.Value/10)
		Clicks.Value = 0
end
end)

I tryed almost everything, but can’t initiate that script