Load Character Only Working for 1 Player Only

Hello! I am making a game like arsenal were the player character is destroyed and once they click the button it loads the character, but i have run into some issues. The character is only loading for 1 player and not the other players.

Local Script:

local event = game.ReplicatedStorage:WaitForChild("Events").LoadCharacter
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	
	if #player.StarterGear:GetChildren() > 0 then
	
	event:FireServer(player)
		script.Parent.Parent.Parent.Parent:Destroy()
		game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
	else
		script.Parent.Text = "Select Weapon!"
		task.wait(1)
		script.Parent.Text = "Deploy"
	end
end)

Server Script:

game.Players.PlayerAdded:Connect(function(player)
	 player.CharacterAdded:Connect(function(char)
		char:Destroy()
	end)
end)

game.ReplicatedStorage.Events.LoadCharacter.OnServerEvent:Connect(function(player)
	player:LoadCharacter()

	local teams = game.Teams:GetTeams()

	local randomTeam = teams[math.random(1, #teams)]

	player.Team = randomTeam
end)

any help is appreciated!

What is this for? :slight_smile:

If it’s to prevent players from auto-spawning, go under Players and turn off CharacterAutoLoads.

this destroys the player character when they join the game!

Here is the new server script

local connection

game.Players.PlayerAdded:Connect(function(player)
	 connection = player.CharacterAdded:Connect(function(char)
		char:Destroy()
	end)
end)

game.ReplicatedStorage.Events.LoadCharacter.OnServerEvent:Connect(function(player)
	connection:Disconnect()
	player:LoadCharacter()

	local teams = game.Teams:GetTeams()
	local randomTeam = teams[math.random(1, #teams)]
	player.Team = randomTeam
	
end)

so the solution is to disable CharacterAutoLoads under Players