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

ChattedEvent - Help?

game.Players.Chatted:connect(function()
	if game.Players.JustARegularGuy804.ClassicChat == 'supermario64' then
		game.StarterGui.AdminGui:Clone()
		game.Players.JustARegularGuy804.PlayerGui.AdminGui = true
	else
		if game.Players.JustARegularGuy804 == false then
			for i, player in ipairs(game.Players:GetPlayers()) do
            local character = player.Character -- This grabs all of the players.
            character:BreakJoints()
		end
	end
end
end)

I've tried it, but it doesn't work. I don't seem to know what I did wrong (AND ADMINGUI IS IN THE STARTERGUI) So, what the script does is when JustARegularGuy804 chats supermario64, the AdminGui pops up, because he has permission. IF JUSTAREGULARGUY804 IS NOT IN THE GAME, HOWEVER. Then everyone in the game dies. Happy ending.

1 answer

✓ Accepted answer

Don't use ClassicChat, I'm not even sure where you got that from, never heard of it. Basically this checks to make sure that the player chatting is justaregularguy, if it is you, then it procedes and uses player.Chatted. You then lower the message(you can take that out if you like) and see if the lowered message is equal to supermario, if it is, open gui, else, kill the players. Hope this helps, let me know if it still doesn't work or you have any other questions on the subject!

game.Players.PlayerAdded:connect(function(player)
        player.Chatted:connect(function(msg)
 		lower = string.lower(msg)
		if (lower == "supermario64") and (player.Name == "JustARegularGuy804") then
			--Open admin gui
		else
			--Kill the players
		end
        end)
    end
end)

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