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

Help my main game script isn't working?

Asked by
Rdite 30
9 years ago

My main game script isn't working all of the names are correct however the output says theres a error on line 49

--VARIBLES--
local MG = script.MG
local Music = script.Music
local Survivors = script.Survivors
local Maps = game.Lighting.Maps
local LobbyMusic = Music.Lobby
local RoundStart = Music.RoundStart
local RoundEndings = Music.RoundEndings
local RoundEndDied = RoundEndings.RoundEndDied
local RoundEndSurvived = RoundEndings.RoundEndSurvived
local RoundMusic = Music.RoundMusic:GetChildren()
local Survivors = script.Survivors
--VARIBLES[ENDED]--
--GetPlayerVarible--
local Players = game.Players:GetChildren()
for i, v in pairs(Players) do
    if v.PlayerGui.MG then
        else
    local MainGuis = MG:Clone()
    MainGuis.Parent = v.PlayerGui
    InterP = MainGuis.IntermissonPage
    NextMapP = MainGuis.NextMapPage
    SurviversP = NextMapP.Parent.SurviversPage
    TimeLeftP = SurviversP.Parent.TimeLeftPage
    MoreThan1Plr = v.PlayerGui.MG.Not2Players
    RandomMap = MainGuis.RandomMap
    end
    end
--GetPlayerVarible[ENDED]--
--MAIN PART--
while wait() do
if game.Players.NumPlayers > 1 then
    if InterP.Frame.List.MapTitle.Text == 15 then
        return false
    else
        InterP.Frame.List.MapTitle.Text = 15
    end
    if MoreThan1Plr.Visible == true then
        MoreThan1Plr.Visible = false
    end
    InterP.Visible = true
    for i = 15, 0, -1 do
        InterP.Frame.List.MapTitle.Text = i
        wait(1)
    end
    RandomMap.Visible = true
    wait(2)
else
    if MoreThan1Plr.Visible == false then -- Output error?
    MoreThan1Plr.Visible = true
    end
end 
end

1 answer

Log in to vote
0
Answered by 9 years ago

This may be because of the scope. Check that "MoreThan1Plr.Visible" has a value

print(MoreThan1Plr.Visible)

Change "MoreThan1Plr" to a global variable

Scope

Ad

Answer this question