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

Why is this value not changing through a script?

Asked by 2 years ago
Edited 2 years ago

Hi, so I am making a quiz game with a lot of questions in it. So I am making a string value so I can mention it easier. But the problem is that the last part of the script that changes the country value does nothing. No errors but the value just doesn't change and I have no idea why. Should I bring it out of the starterGUI and in a local script not a normal script? Anything appreciated!

local flagTable = {"rbxassetid://9419075019", "rbxassetid://9419079674", "rbxassetid://9419084230", "rbxassetid://9419087761"}
local flag = flagTable[math.random(1, #flagTable)]
local randomflag = " "
script.Parent.ImageLabel.Image = flag
randomflag = flag

script.Parent.Country.Value = (randomflag)

1 answer

Log in to vote
0
Answered by 2 years ago

I forgot starterGUI gets replicated to the PlayerGUI, i looked on the official dev forum and found it. Fixed!

Ad

Answer this question