VexTrexYT
|
  |
| Joined: 20 Dec 2016 |
| Total Posts: 63 |
|
|
| 23 Nov 2017 05:55 PM |
I want to make it so your username must be player1 or player2 for the command to work. It perfectly works with one player string but not with two.
function onChatted(msg, recipient, speaker) source = string.lower(speaker.Name)
local Frame = speaker.PlayerGui.Help.Main --Main Position: {-0.3, 1},{0.1, 1} --:cmds if msg == ":guide" and speaker.Name == "player1" or "player2" then Frame.Visible = true Frame:TweenPosition(UDim2.new(0.05, 1,0.1, 1), 'Out', 'Bounce', 1) end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
|
|
|
| Report Abuse |
|
Laedere
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 23601 |
|
|
| 23 Nov 2017 05:56 PM |
if msg == ":guide" and speaker.Name == "player1" or speaker.Name == "player2" then
also i suggest you learn about dictionaries before making admin commands
|
|
|
| Report Abuse |
|
VexTrexYT
|
  |
| Joined: 20 Dec 2016 |
| Total Posts: 63 |
|
| |