I’ve been working on my epic game for a while and I am trying to figure out how to use string.gsub. I’ve seen several topics including this but none give me a good idea of what it does. At the moment I’m using string.find for 3 possible strings
What I'm doing
local NewMessage = string.sub(Message,1,9)
local RestMessage = string.sub(Message,10,#Message)
game.ReplicatedStorage.Events.ModActionRequest:InvokeServer('ShutdownProcess',RestMessage)
elseif
--[[--------------]]--
-- Kick Function --
--[[--------------]]--
Message:find('!Kick') or Message:find('!kick') or Message:find('!KICK') then
local NewMessage = string.sub(Message,1,5)
local KickedPlayer = string.sub(Message,7,#Message)
game.ReplicatedStorage.Events.ModActionRequest:InvokeServer('KickProcess',KickedPlayer)
If there’s anything I can improve on in my code (at least 20 things I must improve) please note them in the reply section. Thanks