I tried using ABritishChaps string:sub idea, but it did not work and the SH Discord said string.find is better, can anyone help?
if string.find(prefix, "kill ") then print("found that") target = game.Players:FindFirstChild(msg:sub(7)) print(target) end
ps. Already put player.chatted and stuff! I will do the kill function later but for now the script just lets me know if it is working!
string string.sub ( string s, int i = 1, int j = -1 )
if string.sub(msg, 1, 6) == prefix .. "kill " then -- If the command starts with the prefix local target = string.sub(msg, 7) -- Use string.sub to substring the prefix and command from the "target" print(target) -- print the target end
oh yeah u should work on ur whitespacing i dont know how could SH be so bad at scripting lmao