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

Players Needed Problem?

Asked by
KAAK82 16
10 years ago
REnd = script.Parent.RoundEnd
RScript = script.Parent.RoundScript

while wait() do
    if game.Players.NumPlayers < 3 then
        MSG = game.Workspace:FindFirstChild('PlayersNeeded')
        if MSG == nil then
            local m = Instance.new("Message")
            m.Parent = game.Workspace
            m.Name = 'PlayersNeeded'
            m.Text = "At least 3 Players are needed to play the Game!"

            REnd.Disabled = true
            RScript.Disabled = true
            RScript.RoundStart.Value = false
        elseif
            MSG ~= nil then
            print('Message Already Exists!')

            REnd.Disabled = true
            RScript.Disabled = true
            RScript.RoundStart.Value = false
        elseif
            game.Players.NumPlayers > 2 then
            REnd.Disabled = false
            RScript.Disabled = false
            RScript.RoundStart.Value = true
            msg = game.Workspace:FindFirstChild('PlayersNeeded')
            if msg ~= nil then
                m:remove()
            end
        end
    end
end

I tested in Studio, Ribbon Bar lets u insert Players so I did that and after I inserted them, the print() stopped but the msg didn't Delete... and this didn't Enable the other Script for me... :/

1 answer

Log in to vote
0
Answered by
foxy83 15
10 years ago

Whats the name of is if its message use Message:Remove()

0
so u say :remove()'ll fix my problem? I'll try it... KAAK82 16 — 10y
Ad

Answer this question