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

I need help with a on chatted event, can anyone help me out please?

I want to make it so when a player says !Host it will, first of all, check their rank, then do this:

		game.StarterGui:SetCore("ChatMakeSystemMessage", {
			Text = "This session will start soon! Your Host is: "..Player.Name; 
			Font = Enum.Font.Cartoon;
			FontSize = Enum.FontSize.Size96;
		})

Can anyone help me out here, I've tried a lot of different ways, and none of them worked. Thank you in advance! :D

1 answer

✓ Accepted answer

The chatted event gives you a message argument;

What you want to do is have an if statement checking if the message is equal to the desired command and then execute whatever you want.

Player.Chatted:Connect(function(msg)

if msg:lower() == “!host” then 
--do your thing
end
end)

Sorry for improper tabbing, i am writing it on my phone

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