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

(?) I need help with player.Chatted

Asked by
chafava -113
6 years ago
1if message == prefix and "test" then
2                        print("gi")
3                    end

I tried making a script where typing the prefix ';' and 'test; to join together as ';test', it should print "gi". I tried using the code above this text and simply got no errors, no warnings, but nothing happened, can you help with this script?

PS. This if then statement is inside a Player.Chatted function.

1 answer

Log in to vote
0
Answered by
pwx 1581 Moderation Voter
6 years ago

You almost had it, here you go:

1if Message:lower() == prefix..'test' then
2    print('gi')
3end
0
is there a difference between using ' ' and " " for strings? User#28017 0 — 6y
0
There is no difference CrazyCreator chafava -113 — 6y
0
Wait, I had to unaccept the answer because the script wasn't working, can you provide a fix? chafava -113 — 6y
0
no actually it works, ty chafava -113 — 6y
Ad

Answer this question