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

is it possible to max inventory slots?

Asked by
DevingDev 346 Moderation Voter
8 years ago

i really woundering if it is possible to make a script that i cant have more then 1 tool in the backpack?

0
Yes you would just use http://wiki.roblox.com/index.php?title=API:Class/Instance/ChildAdded . As this is so simple to do im not going to make a scritp :P User#5423 17 — 8y
0
i cant understand how that will do so i cant have more then one tool in the backpack DevingDev 346 — 8y
0
This event will fire when a tool is added to the player backpack, simply discard the tool if there is one present in the players backpack User#5423 17 — 8y
0
ya, Okay but i dont know how to change that in the script DevingDev 346 — 8y
View all comments (3 more)
0
Can you post the script? User#5423 17 — 8y
0
i mean i dont know what i have to change so if a tool is added then it just discards it with the childAdded script DevingDev 346 — 8y
0
The childAdded event will give you the tool that is being adde as its paramater, check that there is no tools in the backpack then add/delete the tool. User#5423 17 — 8y

1 answer

Log in to vote
-1
Answered by 8 years ago

example local tool_A = script.Parent local player = game.Players.LocalPlayer

tool_A.Equipped:connect(function() player.Backpack.tool_B:Destroy() --if you do not want other tools to destroy or dissapear then say its new parent = game.Workspace

end)

Ad

Answer this question