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

Roblox scripting dialog change color script?

How can I change a dialog color in scripting in roblox studio because it works on my client/local (Also known as running the game through roblox studio) but not through the game it self.

local Core = script.Parent
local Charles = Core.Charles
local Fern = Core.Fernando
local Step = Core.Stephanie
local Wendy = Core.Wendy

function onStart()
Wendy.Head.WendyTalk.InUse = true
end

Step.Head.StephanieTalk.DialogChoiceSelected:connect(function(player,choice)
Step.Head.StephanieTalk.Tone = "Enemy"
if choice.Name == "ContinueLoser" then
    Wendy.Head.WendyTalk.InUse = false
elseif choice.Name == "FightBack" then
    player.Character.Humanoid.Health =   player.Character.Humanoid.Health - 10
end
end)

Wendy.Head.WendyTalk.DialogChoiceSelected:connect(function(player,choice)
Wendy.Head.WendyTalk.Tone = "Enemy"
end)

Charles.Head.CharlesTalk.DialogChoiceSelected:connect(function(player,choice)
Charles.Head.CharlesTalk.Tone = "Friendly"
end)

Fern.Head.FernandoTalk.DialogChoiceSelected:connect(function(player,choice)
if choice.Name == "Agree" then
    Fern.Head.FernandoTalk.Tone = "Friendly"
elseif choice.Name == "Disagree" then
    Fern.Head.FernandoTalk.Tone = "Enemy"
end
end)

I also know this is a correct code as well, just wanted to post it here just in case because I've tried localscript and a script and it only works on the test play in the Roblox studio program so I mainly need help with suggestions and ideas of how to make it work on Roblox itself than just the Roblox studio program because I've tried searching the web for help but the only help was how to create dialogs when ever I already know how.

Update I do not need help on this anymore, I'll leave my answer below.

2 comments

0

use code block pls

0

Sorry...I was in a rush to do so...i'll do it now.

1 answer

I answered my own question about a year ago about a day or two after asking this on this website, but I accomplish this by putting it inside a local script. As I had it in a script and the dialog runs on the client side so thereby making it a localscript.

Tip for Helpers: As I seen from a lot of people who comments on my questions, the first thing they should ask if there question is something that could be from the client would be if there code is in a server script or client script. Just don't ask for a code yet at posting the code would most likely be pointless.

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