I'm trying to add a command to a admin script i am working on but it isn't working. Not really sure what i am missing in the code.
if msg:lower():sub(1,4) == "f3x " then local plrz = GetPlr(plr, msg:lower():sub(5)) for i, v in pairs(plrz) do coroutine.resume(coroutine.create(function() if v and v:findFirstChild("Backpack") then game.Lighting["F3X Tools"]:Clone().Parent = player.Backpack end end)) end end
Remember, :sub()
counts the characters. 'f3x ' Is 4 characters, not 8 characters. f is 1, 3 is 2, x is 3, and space is 4.
I'm not experienced with coroutines, so I'll assume that's correct. I'll also assume your GetPlr function is correct.
Hope I helped!