So I’m creating this game where you can travel around the world and I am making a country randomizer but it doesn’t work. Here is the script:
local location = math.random(1, 5)
if location == 1 then
script.Parent.CountryName.Value = "Russia"
end
if location == 2 then
script.Parent.CountryName.Value = "USA"
end
if location == 3 then
script.Parent.CountryName.Value = "Australia"
end
if location == 4 then
script.Parent.CountryName.Value = "Japan"
end
if location == 5 then
script.Parent.CountryName.Value = "China"
end
while true do
print(script.Parent.CountryName.Value)
wait(1)
location = math.random(1, 5)
wait(1)
end
It prints a random country but doesn’t randomize it each second.