Alright, so I have this code:
hs = game:GetService("HttpService")
game.Players.PlayerAdded:connect(function(p)
local s = hs:GetAsync("https://pastebin.com/raw/8GEsq0hi")
for w in string.gmatch(s, "%d+") do
if tostring(p.userId) == w then
wait()
p:Kick("An admin has banned you, please contact the game owner to appeal.")
break
end
end
end)
What I want to do is fetch a "ban reason" from the pastebin, but how would I do that? I tried to put a "banrsn" on each one, but instead I just wouldn't get kicked, can somebody explain how to use string.gmatch and stuff? Thanks. NOTE: I checked the wiki, and none of the stuff there really helped.

1 comment
You should use pcall(). :GetAsync can be mess up and throw some error. https://devforum.roblox.com/t/pcall-function/227937