So, the script provided below is about a remote event being fired into a server script (not sure if I used the right words but you get the idea) and so that once the remote event is fired, this script will run. The output doesn't show any errors but it's still not working.
So in the script, after checking if the player is inside the "France" team, then the script should kill the player so they can reset and be given proper uniform for their class (officer). And then after that, I used the CharacterAdded event to detect when they re spawn and give them their proper uniform. But it won't work. I think this is where the issue is, but I can't find it.
-- SERVICES
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = game:GetService("Players")
local Team = game:GetService("Teams")
--EVENTS
local OfficerEvent = ReplicatedStorage:WaitForChild("OfficerEvent")
local InfantryEvent = ReplicatedStorage:WaitForChild("InfantryEvent")
local RiflesEvent = ReplicatedStorage:WaitForChild("RiflesEvent")
-- OFFICER EVENT
OfficerEvent.OnServerEvent:Connect(function(player)
local character = player.Character
if player.Team == game.Teams.France then
player.Character.Humanoid.Health = 0
player.CharacterAdded:Connect(function()
character:WaitForChild("Shirt").ShirtTemplate = "rbxassetid://1422626514"
character:WaitForChild("Pants").PantsTemplate = "rbxassetid://1070344465"
end)
end
end)
Thanks in advance!

2 comments
I assume that the CharacterAdded event isn't firing, because it only has the chance to fire when OnServerEvent fires. So what you can do is, call the :FireClient() inside the CharacterAdded. So basically put the CharacterAdded in the localscript instead.
But I want the ChararcterAdded and the code below it to be seen by other players as well