FlashLight(懐中電灯)をゲーム開始時にプレイヤーのバックパックに移動して装備させる例を記載します。
①ServerStorageにToolsフォルダーを作成し、FlashLightを入れておきます。

②以下のscriptを記載します。
ServerScriptServiceの直下

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local flashLight = game.ServerStorage.Tools.FlashLight:Clone()
flashLight.Parent = player:WaitForChild("Backpack")
local humanoid = char:WaitForChild("Humanoid")
humanoid:EquipTool(flashLight)
end)
end)