Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help getting all tools under a model?

Asked by
StoIid 364 Moderation Voter
8 years ago

How would I go about making a script get ALL the tools that are grouped together, and putting them into your backpack?

0
Also use IsA to check that the item is a tool e.g. itm:IsA("tool") User#5423 17 — 8y
0
Thank you both. StoIid 364 — 8y

1 answer

Log in to vote
0
Answered by
alibix123 175
8 years ago
for _,tool in pairs(model) do
    print(tool.Name)
    -- other stuff
end

You need a for loop. http://wiki.roblox.com/index.php?title=Loops#For

Ad

Answer this question