You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
That everyone gets 3 items in a folder after the game starts
- What is the issue? Include screenshots / videos if possible!
Im not sure but i think when the round starts the first player to load gets all the items of the other players like on these screen shots
Plyr 2
Plyr 1
- What solutions have you tried so far?
I have tried to search on many forums but i can’t seem to find my error
this is the code that clones the item
--local RS = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Folder1 = RS:WaitForChild("Weapons").Melee
local Folder2 = RS:WaitForChild("Weapons").Ranged
local Folder3 = RS:WaitForChild("Weapons").Special
local inRound = game.ReplicatedStorage.InRound
local plr
game.ReplicatedStorage.GetThePlayer.OnServerEvent:Connect(function(plyr)
plr = plyr
end)
local function onCharacterAdded(character)
if inRound.Value == false then
return
else
local Melee = Folder1:GetChildren()
local Ranged = Folder2:GetChildren()
local Special = Folder3:GetChildren()
local MeleeTable = Melee
local RangedTable = Ranged
local SpecialTable = Special
local MeleeTools = {}
local RangedTools = {}
local SpecialTools = {}
repeat
local selectedIndexMelee = math.random(1, #MeleeTable) -- Melee
table.insert(MeleeTools, MeleeTable[selectedIndexMelee])
table.remove(MeleeTable, selectedIndexMelee)
local selectedIndexRanged = math.random(1, #RangedTable) -- Ranged
table.insert(RangedTools, RangedTable[selectedIndexRanged])
table.remove(RangedTable, selectedIndexRanged)
local selectedIndexSpecial = math.random(1, #SpecialTable) -- Special
table.insert(SpecialTools, SpecialTable[selectedIndexSpecial])
table.remove(SpecialTable, selectedIndexSpecial)
until #MeleeTools >= 1 and #RangedTools >= 1 and #SpecialTools >= 1
-- Numbers of tools going to give
-- Cloning Tools
for i,v in pairs(MeleeTools) do -- Melee
Folder1:FindFirstChild(v.Name):Clone().Parent = plr.Backpack
end
for i,v in pairs(RangedTools) do -- Ranged
Folder2:FindFirstChild(v.Name):Clone().Parent = plr.Backpack
end
for i,v in pairs(SpecialTools) do -- Special
Folder3:FindFirstChild(v.Name):Clone().Parent = plr.Backpack
end
end
end
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
onCharacterAdded(Character)
end)
end)
inRound.Changed:Connect(function()
if inRound.Value == true then -- When round starts
if plr.Team == game.Teams.Playing then
return
else
for i, v in pairs(game.Players:GetChildren()) do
wait(1)
onCharacterAdded()
end
end
end
end)
game.Players.PlayerAdded:Connect(function()
if inRound.Value == true then
wait(2)
onCharacterAdded()
end
end)
I just want to know how i can make all the players have 3 items any help would be appreciated

