How to make auto loot in Roblox
Auto loot turns debris into rewards: once pieces settle on the ground they get an outline, and when a player walks near they zip into the player and a counter goes up. It pairs with breakable trees, rocks or crates.
The auto loot prompt
Select the object in Studio first (or mention it with @), then send this. Change any words you like before sending.
Then keep talking to it
- 2Looting should be faster.
- 3Show a +1 popup when I pick something up.
- 4Add a pickup sound.
What the AI builds
- A Loot tag on dropped parts
- leaderstats with a Wood value for every player
- A server Script that outlines landed parts and tweens them to the player
How it works
Parts are only lootable after they land: the script waits until their speed drops below one stud per second, then adds a white outline and marks them as landed.
A loop checks which landed parts are within the loot radius of a player. Those parts stop colliding, tween to the player in about a quarter of a second, then disappear and add one to leaderstats.
The tween time is a constant at the top of the script, so "faster" or "slower" is a one-word change.
How to make auto loot in Roblox, step by step
- 1
Decide what counts as loot
Auto loot works on parts with the Loot tag. The usual source is breakable trees: the pieces of a broken tree become loot. You can also ask the AI to tag rocks, crates or any parts you select.
- 2
Send the prompt
Send the prompt from this page or paste it into the plugin. The AI writes a server Script, creates a leaderstats folder with a Wood value for each player and makes sure new loot gets the tag.
- 3
Let the pieces land
Press Play and break something. Pieces only become loot once they slow down below one stud per second, so a part that is still flying cannot be grabbed. Landed pieces get a white outline so players can see what is collectable.
- 4
Walk near the loot
Within about 10 studs, each landed piece stops colliding, slides into your character in around a quarter of a second and disappears. The Wood counter on the leaderboard goes up by one per piece.
- 5
Adjust speed and reach
Say "looting should be faster" or "pick up from further away". The tween time is a constant at the top of the script and the radius is a single number, so both are one-line changes you can also make by hand.
Roblox auto loot settings you can change
Change any of these by asking in plain words, or open the script and edit the value yourself. Each prompt is one undo step, so you can try a value and go back.
- LOOT_TWEEN_TIME
- How long a piece takes to fly to the player, between 0.2 and 0.35 seconds. Lower is snappier.
- LootRadius
- 10 studs by default. A bigger radius feels like a magnet; a smaller one makes players walk over each piece.
- Landed
- The attribute that marks a piece as collectable after it stops moving. It is checked for up to 3 seconds after the piece appears.
- Collecting
- Set while a piece is flying to a player so two players cannot collect the same piece.
- Counter name
- Wood by default. Ask for Stone, Gems or several counters and the AI adds a value per item type.
Fixing auto loot in Roblox
Pieces are grabbed while still in the air
That happens when loot is collected without waiting for it to land. The recipe only collects parts marked Landed; if you wrote your own loot parts, make sure they also go through the landing check.
The counter does not show
leaderstats must be a Folder named exactly leaderstats inside the Player, created when the player joins. Ask the AI to check it and it will fix the name or the place it is created.
Some pieces never get an outline
A piece that keeps rolling on a slope may stay above the speed threshold. Give it a moment, or ask the AI to accept slower pieces after a short timeout.
Loot passes through the floor
During collection the piece is anchored and set to not collide on purpose. If pieces fall through before they are collected, the floor may have CanCollide off.
More auto loot ideas to try
Once the basic version works, send one of these as your next prompt. Each builds on what is already in your place.
“Show a +1 popup above my head when I pick something up.”
Adds a small BillboardGui that floats up and fades, triggered from the same place the counter goes up.
“Play a pop sound on pickup.”
Adds a Sound to the collected part or the character. You give the audio id, or the AI leaves the id empty for you to fill.
“Count stone separately from wood.”
Adds a second leaderstats value and an attribute on each loot part that says which counter it belongs to.
“Make the loot glow green instead of white.”
Changes the Highlight's OutlineColor. One property, one prompt.
Where it goes in Explorer
- Players / each player / leaderstats / Wood (IntValue)
- ServerScriptService / AutoLoot (Script)
- Loot parts anywhere in Workspace, tagged Loot, with Landed and Collecting attributes while in play
Script names can differ a little; the AI names things to fit your game and tells you what it added.
Tips for a good prompt
Select the object first, or mention it with @, so the AI changes the right thing. Say what the player should see and feel, not how to script it: “the parts should fly a little and spin” works better than naming functions.
Ask for one change at a time and press Play in between. If something is off, describe what you saw, like “it only works once” or “the pieces go through the floor”. If a change goes the wrong way, press Ctrl+Z once and try different words.
Scripting it by hand vs. with AI
By hand you would tag loot parts, poll each part's velocity until it settles, add a Highlight, run a distance loop against every player, turn off collisions, tween the part into the character, destroy it and update leaderstats on the server, plus guard against double collection. The plugin builds all of that from one prompt and keeps the timing in named constants so later changes are easy.
Before you start
You need Roblox Studio on Windows or macOS and the free Roblox AI Game Maker plugin, connected to your account with an 8 character code. New accounts get 2 credits and a free model you can use every day. A typical prompt on a cheap model costs a few hundredths of a credit, and the AI play-tests and fixes errors as part of the same build. Write in any language; the AI answers in the same one.
Auto loot FAQ
Can it count different items?
Yes. Ask for separate counters, for example Wood and Stone, and the AI adds a value per item type.
Is it safe from exploiters?
Collection happens on the server and checks distance there, so a client cannot grant itself loot.