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

Help with Tables?

Asked by 8 years ago

Can someone tell me why this work's if I just do if msg == args but not if msg == Prefix.." "..args?

local Prefix = ";"

function MakeCommand(args)
    game.Players.PlayerAdded:connect(function(plr)
        plr.Chatted:connect(function(msg)
            if msg == Prefix.." "..args then
                local m = Instance.new("Message",workspace)
                m.Text = "Hi there "..plr.Name
            end
        end)
    end)
end

MakeCommand("hi")

Answer this question