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

How to change the property of an object when user says (x)?

Asked by 10 years ago

Looking on making a sort of game that has certain elements when you need to say something in order for a door to open.

But, I was also wondering if there was a way to make it so it can only be activated from a certain amount of bricks away. Because, if someone has been on the server before, they can ruin it for the people by saying the word right when they spawn, when they're miles away from the door.

So, this is what I need:

A script that changes the property of a brick when user says (x). A second part to this script that won't allow the brick to change properties if they're not close enough.

I can do without the second part, but I'd really prefer if it would go with it. Dunno if it's not possible.

Cheers,

2 answers

Log in to vote
0
Answered by 10 years ago

This is not a request site. But.. You'd have to use this: game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(msg) if msg == "x" then --Rest of code here end end) end) I will not finish it for you.

Ad
Log in to vote
0
Answered by
KAAK82 16
10 years ago

Check this

Answer this question