So I am just trying to figure out how to use it to shorten usernames (I believe it can do that) in like admin commands for example. Any answers?
COMMUNITY QUESTION
I am trying to shorten usernames, one answer I got is string.find, how would I use string.find()?
2 answers
you can use
if string.sub(message:lower(),1,5) == "/kill" then
local PlayerSelect = string.sub(message:lower(),7)
for i, v in pairs(game.Players:GetPlayers()) do
if v.Name == PlayerSelect then
v.Character.Humanoid.Health = 0
end
end
end
like that
2 comments
0
well idk,it may,i dont remember
0
You can ask me if you want more lines
These two articles will be able to help! they're a bit trickey but if you spend a minute to understand them it's not that bad! :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
I recommend using string.sub.
So, how would I use that? I am a trash scripter sorry. lol
when i was doing this i followed an example on the developer forums https://devforum.roblox.com/t/how-to-make-a-player-name-shortening-system/609898/4