We spawn or respawn i should get 3 random weapon
ServerScriptService.Script:21: attempt to index nil with 'Clone'
Stack BeginScript 'ServerScriptService.Script', Line 21 - function onCharacterAddedStack End
local RS = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Folder = RS:WaitForChild("Folder")
local function onCharacterAdded(character)
local Tools = Folder:GetChildren()
local ToolsTable = Tools
local chosenTools = {}
repeat
local selectedIndex = math.random(1, #ToolsTable)
table.insert(chosenTools, ToolsTable[selectedIndex])
table.remove(ToolsTable, selectedIndex)
until #chosenTools >= 3
-- Numbers of tools going to give
local plr = Players:GetPlayerFromCharacter(character)
for i = 1, 4, 1 do
print(i) -- Index
print(chosenTools[i]) -- Tools
local ToolsCloned = Folder:FindFirstChild(chosenTools[i]):Clone()
ToolsCloned.Parent = plr.Backpack
end
end
local function onAdded(player)
player.CharacterAdded:Connect(onCharacterAdded) -- Triggers when the player spawns or respawns
end
Players.PlayerAdded:Connect(onAdded)

2 comments
Well, as far as I cane tell, your script is not finding anything in the folder to clone. You can also check that by adding an if statement that says if Folder:FindFirstChild(chosenTools[i]) then print("Found") else print("not found thus there is nothing to clone") end
Well i did that and it says Found but still not working