Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Does dialogue scripting just not work anymore?

I'm trying to make a basic gun dealer but I can't seem to get any dialogue script to work.

Heres a picture: https://gyazo.com/ada4ed6a51afcaf257c46fac6fddb786

I used the basic example on the wiki and it didn't work.

Here is the script in the script and local script:

script.Parent.DialogChoiceSelected:connect(function(player,choice)
	print(player.Name,choice.Name)
end)

It returns nothing when I select dialog. No errors, nothing.

2 answers

Make sure that the script is inside a local script somewhere a localscript can run such as the StarterGui

The wiki page for DialogChoiceSelected says that:

This event is client-side only and will not fire on the server. It should be connected to in either a LocalScript or a ModuleScript required by a LocalScript.

5 comments

0

Like shown the picture I included there is a version of it in a local script.

0

That is a normal script object, not a local script. A local script looks like this: https://imgur.com/8giy6Ay

0

The difference between the two is that one runs code on the player's client which means it only runs on the player's laptop, where the normal script is ran on the server by roblox.

0

local scripts have an icon of a little dude wearing a blue shirt to show that it's a script for the player, not the server. it can only be ran in one of those in somewhere such as the playerGui like i show in the picture. the dialog chat will still show up on the server but the code will need to be in a local script

0

did this work? please mark it as accepted if it works.

This discussion is preserved as it was. New answers, comments, and votes are closed.