Script:

function Buy(player, dialogChoice)
	if dialogChoice.Name == "Choice1" then
		print("hi")
	end
end

script.Parent.DialogChoiceSelected:Connect(Buy)```

Is there a problem with my script or something?

also the setup:
https://gyazo.com/389593a9a8de868a1420255fbaf40213