I have just recently learned how to script Lua and i need some help. So, I have tried to make my own now but I can't find out how. Below is what I tried to do

while true do

local startingtime = 100
local maps = game.Lighting.maps:getchildren()
ranMap = math.random getmapschildren() (#1)

wait(1.5)
for startingtime = 100, 1, -1 do
startingtxt = Instance.new("Hint", Workspace)
startingtxt.Text = "Intermission: " ..startingtime
wait(0.1)
game.Workspace.Message:remove()
end

roundstarting = Instance.new("Hint", Workspace)
roundstarting.Text = "Round starting!"
wait(2.5)
game.Workspace.Message:remove()

donetimer = Instance.new("Hint", Workspace)
donetimer.Text = "Choosing a map."
wait(1)
game.Workspace.Message:remove()
donetimer2 = Instance.new("Hint", Workspace)
donetimer2.Text = "Choosing a map.."
wait(1)
game.Workspace.Message:remove()
donetimer3 = Instance.new("Hint", Workspace)
donetimer3.Text = "Choosing a map..."
wait(1)
game.Workspace.Message:remove()

mapchosen = Instance.new("Hint", Workspace)
mapchosen.Text = "The map chosen is " ..maps[ranMap] "!"
wait(3)
game.Workspace.Message:remove()
script.Parent.ranMap.name = game.Players.getchildren()
move()
end

That is what I tried, but something is not working here. Can someone help or tell me whats wrong?

4 comments

0

Put this into correct format please.

0

If there are any errors in the output, please show us.

0

Press the CodeBlock (Blue cirlces) and paste code in-between squiggly lines "~~~~~~~~~~~~~"

0

line 5 has an error, but it would help if you do the proper spacing