local mapHolder = game:GetService("ServerStorage").MapHolder
local Children = mapHolder:GetChildren()
local Index = math.random(1,#Children)
local randomInt = Children[Index]
local finalMap = mapHolder:FindFirstChild(randomInt.Name):Clone()
finalMap.Parent = workspace
game.StarterGui.ScreenGui.DisasterLabel.Text = "The Map Is " .. finalMap.Name
Hey ya’ll! I’m a very new programmer so I followed this tutorial in order to make a random map selector. The code above is part of a script in that tutorial.
The script is in ServerScriptService, MapHolder is a folder of maps in serverStorage and ‘DisasterLabel’ is in starterGUI.
The code that changes the text of DisasterLabel (that i wrote myself, hence the issues) does nothing. I realized that text in a TextLabel can only be changed with a localScript in the label itself, but I have no clue how I’d communicate between the two scripts in order to change the text. Any help?
If anything is unclear, hmu. I may have forgotten details.
Thanks in advance!