How do i make so pepole pepole get 4 random weapons from the catalog everytime they spawns?
COMMUNITY QUESTION
How do i make so pepole pepole get 4 random weapons from the catalog everytime they spawns?
1 answer
You will need to make a table of all the IDs of the weapons on the catalog, which might be a hard work. Then just put this inside a global script:
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(a)
local v=p
for i=1,4 do
local rnd=math.random(1,#ids) -- ids must be the weapon ID table
game:service("InsertService"):LoadAsset(ids[rnd]).Parent=v.Backpack
end
end)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
at least 1