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

How to make it so that I can only have 3 items equipped?

Asked by 5 years ago

is there like an CoreGui thing to set the maxiumum tools that can be out???

Also by that I mean you know how if you play on a iphone a small one u can only have 3 tools but then when you open backpack it shows more tools and u can drag it and put it in 3 tool space

0
Make your own backpack display. RubenKan 3615 — 5y
0
^ OOF greatneil80 2647 — 5y

1 answer

Log in to vote
0
Answered by
rokedev 71
5 years ago

probably gonna be alot of mistakes but heres just how i would approach it

local wepnum = #game.Players.LocalPlayer.BackPack:GetChildren()
if wepnum > 3 then
-- do something such as kill the player

in general you would want to figure out how to order the way that things are added to the players backpack, for example you would insert the tool name into a table and the most recently added object to the table would be removed from the players backpack if the # is over 3

Ad

Answer this question