Why wont my dialogue script work?

do you have anything installed to screen shot?

do you have gyazo, lightshot or something?

are those plugins?

–30 charss

no those are not plugins they are apps to screenshot. you can download lightshot from there: Lightshot — screenshot tool for Mac & Win

ahhhh ye im done with downloading things from web ive lost 2 computers to it. ._.

You have a ‘snipping tool’ already installed inside windows if you are using one.

i think you can just press the PrtSc button on your keyboard and it will take a screen shot

Is this a script or a localscript?

this came up in output
0:00:22.251 - Workspace.Throne.Demon King.Head.Dialog.DialogChoice.DialogChoice.Script:1: attempt to index nil with ‘Name’

it is a script.

It has to be a local script since you can’t define local player like that inside of a normal scirpt.

1 Like

put the code in a localscript. you cant access localplayer from scripts

2 Likes

good to know thank you for teaching me

You can access it but in a different way.

1 Like

Scripts don’t have a local player, since those scripts don’t run on a client’s machine. This should be in a local script. On another note, do not use normal scripts for gui manipulation, because what you do on the client will not be replicated to the server

1 Like

still does not work :neutral_face:

o0100101011101 i did

delete the .Value and put the code in a localscript

do you get any errors or something?

Local scripts can’t run if it’s a descendant of the workspace, with the only exception being if it is a descendant of the player’s character. You can put it in StarterCharacterScripts, StarterPlayerScripts, StarterPack or StarterGui and just reference the dialog choice from the script

2 Likes
local playerName = game.Players.LocalPlayer.Name
script.Parent.UserDialog.Text = ""..playerName

local script

Script version:

for i,v in pairs(game.Players:GetPlayers()) do 
      local playerName = v.Name
      script.Parent.UserDialog.Text = ""..playerName
end

try the script version if the localscript doesnt work.

1 Like

The problem here why the localscript is not working is because either what @Raretendoblox said or the UserDialogText is the parent of the script and not the localscript.