Hello I’m making a script to pick a random player and attach an accessory to the chosen player.
Script:
local Players = game:GetService("Players"):GetPlayers()
local randomPlayer
game.ReplicatedStorage.StartGame.Event:Connect(function()
if #Players > 0 then
randomPlayer = Players[math.random(#Players)]
local character = randomPlayer.Character
character.Humanoid:AddAccessory(game.ReplicatedStorage.BombGame:Clone())
game.ReplicatedStorage.BombStartGui:FireClient(randomPlayer)
end
end)