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

How do you say a certain word and change an object's property? [closed]

Asked by
YOOORK 0
9 years ago

I need help on a script command. I'm a terrible scripter. I need a command where when I say a certain word, it changes the brick color. Also only people w/ permission are allowed to do that command.

0
Scripting Helpers in not a Request Site; You must first attempt to make the code yourself, we can not make scripts for you (unless we give examples of some-sort of code). TheeDeathCaster 2368 — 9y

Closed as Not Constructive by YellowoTide, woodengop, and Shawnyg

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Velibor 20
9 years ago

Here are a few snippets that you need

Game.Players.PlayerAdded:connect(function(NewPlayer)
NewPlayer.Chatted:connect(function(Message)
if string.lower(string.sub(Message, 1, 4)) == 'kill' then
-- Do action
end
end)
end)

Basically what we are doing :

  • Listen or there is a new Player that joins the game
  • Every single time he starts talking we are listing what he is saying.
  • On Line 3 we take that message, and only listen to the first 4 Characters and convert that to all lowercase characters so that it doesn't matter or you say 'Kill' or 'KILL' or 'KiLL'.
  • If that message is correct we execute the action (Fill in your code on Line 4)

Admin list : - Learn how to work with Tables (See the Wiki) to understand how you should be able to make an admin table.

Ad