Is this the correct way to use find? If not how can I use it?
The code is probably very badly written as i wrote this without testing.
local whitelist = {"PrismaticScripts","Danglt"}
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if player.Name == #whitelist then
if msg:Sub(4):lower() == "age" then
for i,v in pairs(game.Players:GetChildren()) do
print(v.find, msg:Sub(5):lower() .. "age is " .. v.find(v.find, msg:Sub(5):lower().AccountAge))
end
end
end
end)
end)

3 comments
I put the code in a code block and fixed the indentation.
This might answer that question. https://www.lua.org/pil/20.1.html
This question is more subjective than anything else; there is no "correct way" to use it.