I do not know what the RandomWeapon is. Instead of using RandomWeapon use a math.random for the weapons
Put the weapons contained inside the tool folder like this.
, #Weapons)
I think that’d work for this. In the meantime, just check inside the folder and see the amount of weapons inside that folder, the math.random needs to be contained with the amount of weapons in the folder.
the math.random would give the player a random weapon. It would have to give at least everyone a random weapon. You can learn more about math.random here: math | Documentation - Roblox Creator Hub
Make a table of all the weapons. Each time you give a player a weapon, remove that exact weapon from the table and then continue it on and on to all the players.
Real thanks it is working but it keeps on cloning tools to the player.
How can I stop this?
Should I do -
for _,v in ipairs(Players) do
local RandomWeapon = ToolsFolder[math.random(1, #ToolsFolder)]:Clone()
RandomWeapon.Parent = v.Backpack;
wait(1)
RandomWeapon:Destroy()
end