Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Players Needed Problem?

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

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

1 comment

0

so u say :remove()'ll fix my problem? I'll try it...

This discussion is preserved as it was. New answers, comments, and votes are closed.