Im fairly new to scripting; messy code that i came up in my head because im too small brain to think of a simpler way
game:GetService('Players').PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Died:Connect(function() local Player = game.Players.LocalPlayer local number = math.random(1,4) if number == 1 then wait(6) print(1) local gear = workspace.Folder.ClassicSword:Clone() gear.Parent = Player elseif number == 2 then wait(6) print(2) local gear = workspace.Folder.RedHyperLaser:Clone() gear.Parent = Player elseif number == 3 then wait(6) print(3) local gear = workspace.Folder.HyperlaserGun:Clone() gear.Parent = Player elseif number == 4 then wait(6) print(4) local gear = workspace.Folder.Epicsword:Clone() gear.Parent = Player end end) end) end)
You don't put a tool in the actual Player, theres a Backpack child for all of the players, or you can parent it to the character, which will automatically equip it.
gear.Parent = Player.Backpack