Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does dialogue scripting just not work anymore?

Asked by 4 years ago

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

Log in to vote
0
Answered by 4 years ago

I don't think anything works now.

Ad
Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago

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.

0
Like shown the picture I included there is a version of it in a local script. xXGokyXx 46 — 4y
0
That is a normal script object, not a local script. A local script looks like this: https://imgur.com/8giy6Ay royaltoe 5144 — 4y
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. royaltoe 5144 — 4y
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 royaltoe 5144 — 4y
0
did this work? please mark it as accepted if it works. royaltoe 5144 — 4y

Answer this question