MY script is
playarea = math.randomseed(1,3) min = 0 sec = 5 while true do wait(0.1) if script.Parent.Parent.GameMode.Loaded.Value == true then script.Parent.Text = (min..":"..sec) wait(1) sec = sec - 1 if sec == 0 then min = min - 1 sec = 59 end end end while true do wait(0.1) if min == 0 and sec == 0 then game.Workspace("Map" ..playarea):Destroy() playarea = math.randomseed(1,3) wait(60) game.Lighting("Map" ..playarea):Clone().Parent = game.Workspace end end
I dont know why its not working also roblox forums shutdown forever :(
math.randomseed()
isn't the same as math.random()
. Randomseed sets the seed that Random uses. Therefore, you just change the script to:
local playarea = math.random(1,3) local min = 0 local sec = 5 while true do wait(0.1) if script.Parent.Parent.GameMode.Loaded.Value == true then script.Parent.Text = (min..":"..sec) wait(1) sec = sec - 1 if sec == 0 then min = min - 1 sec = 59 end end if min == 0 and sec == 0 then game.Workspace("Map" ..playarea):Destroy() playarea = math.random(1,3) wait(60) game.Lighting("Map" ..playarea):Clone().Parent = game.Workspace end end
I did as some comments suggested, too.
One thing, however. I suggest you use game.ServerStorage
over game.Lighting
. ServerStorage is actually made for what you are using.
Thanks,
Explosion