i dont focus that much on string manipulation, but I want to make a kick command though when i was testing around with string.sub it doesnt work for some reason:
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message == string.sub(":kick ", 1, 6) then
print("lol")
end
end)
end)
im not asking for a script of a entire kick command, but i just want a idea of it

2 comments
what is gsub
:gsub - arg1 = the message, arg2 = the text to look for inside of the message, arg3 the string to replace the text with