I am nooby scripter before you begin.
What is the function of:
for _, v in pairs do
--code
end
And what is ipairs, how do you use it, when should you use it, what's the difference between pairs and ipairs.
I do know that the for _, v in pairs can be used to do this:
function cleanUpcleanUpeverybodyCleanUp()
for _, v in pairs (game.Workspace:GetChildren()) do
if v.ClassName == "Hat" then
v:Destroy()
end
game.Workspace.ChildAdded:connect(cleanUpcleanUpeverybodyCleanUp)
But what is the '_' for and how is it used? I've also seen this:
_G.name <-- What? |