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

How to use simple .Chatted script?

Asked by 8 years ago

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....?

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. User#11440 120 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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

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. User#11440 120 — 8y
0
The formatting makes me cri. koolkid8099 705 — 8y
0
Can you put that in code please? and Its telling me you need an end abysswalk 10 — 8y
Ad

Answer this question