I am making an admin system, and I would like to know how I can have two arguments (for this challenge, I am making a fire command, which arguments will be target and size). Target works, but size does not.
if msg:sub(2, firecommand:len()):lower() == firecommand:lower() then
local name = msg:sub(firecommand:len() + 1)
local firesize = msg:sub(firecommand:len() + 2)
local fireplayer = game.Players:FindFirstChild(name)
if fireplayer then
local new = Instance.new("Fire")
new.Name = "AdminControlledFire"
new.Parent = fireplayer.Character.HumanoidRootPart
new.Size = firesize
else
print("Player not in game!")
end

1 comment
you can now use string.split(string, " ") too