DialogueGui Story Game(LocalScript)

LocalScript:
local Message = game.ReplicatedStorage:WaitForChild(“Message”)

local Image = Message:WaitForChild(“SpeakerImage”)

local Speaker = Message:WaitForChild(“SpeakerName”)

local player = game.Players.LocalPlayer

local DialogueFrame = player.PlayerGui:WaitForChild(“DialogueGui”).DialogueFrame

Message:GetPropertyChangedSignal(“Value”):Connect(function()

if Message.Value == “None” then

DialogueFrame.Visible = false

else

DialogueFrame.Visible = true

end

DialogueFrame.Message.Text = Message.Value

script.pop:Play()

end)

Speaker:GetPropertyChangedSignal(“Value”):Connect(function()

DialogueFrame.ImageLabel.Image = Image.Value

DialogueFrame.NameLabel.Text = Speaker.Value

end)

I’m confused, what exactly are you asking here?

story game is how camping game.

I understand the concept of a story game, but what is the issue with the script you posted and what is the expected outcome?

this dialogue no have error and Work.but needed 2 stringvalue,a LocalScript.Gui,TextLabel,ImageLabel.

if Message.Value == “None” then

should this be

if not Message.Value then

?

A StringValue’s value is an empty string value by default, perhaps they meant if Message.Value == "", they could also do if #Message.Value == 0 or if string.len(Message.Value) == 0.

1 Like