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

How to use simple .Chatted script?

I Basically made a script where a brick follows me , and i wanted to be able to say "Spread" and then it will clone it.

this is what I added:

game.Players.Abysswalk.Chatted:connect(function(msg) if msg == "Spread" then -- right here I wanted my character to jump to know I atleast made some progress. Didnt work though end

end)

it didnt work....?

1 comment

0

Oh my god use code blocks! It's the blue lua button when editing your question that when pressed will make two lines that you're Suppose to put your code into.

1 answer

If you wanted to create a simple one then do this one

local isAdmin = {["Player"] = true}------Change it to who you want to be able to do the message

function onChatted(message, player) if message == "Spread" and isAdmin[player.Name] then----Checks what the message was and then checks to see if that person can run it ----Put what you want to do in here

 end

end

game.Players.PlayerAdded:connect(function(player)----Finds the player player.Chatted:connect(function(message) onChatted(message, player)-----Connects message to player

3 comments

0

Oh my god use code blocks! It's the blue lua button when editing your answer that when pressed will make two lines that you're Suppose to put your code into.

0

The formatting makes me cri.

0

Can you put that in code please? and Its telling me you need an end

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