So, I have a simple script that loads a character, then when a button is clicked, another character is loaded, after the old one is destroyed. The Camera stays stationary.
conf = ReplicatedStorage:WaitForChild(added.Name .. "-Config")
player = added
wait(1)
human = Instance.new("HumanoidDescription")
local a = Color3.new(0.9,0.9,0.9)
human.Shirt = 2738262095
human.Pants = 3140305384
human.HeadColor = a
human.TorsoColor = a
human.LeftArmColor = a
human.RightArmColor = a
human.LeftLegColor = a
human.RightLegColor = a
human.Face = 494299198
human.HairAccessory = "16630147"
added:LoadCharacterWithHumanoidDescription(human)
end)
wait()
repeat
wait(1)
until conf ~= nil
hair = conf.Character.Hair.Value
shirt = conf.Character.Shirt.Value
pants = conf.Character.Pants.Value
face = conf.Character.Face.Value
a = conf.Character.SkinColor.Value
conf.Character.InitializeCharacter.Event:Connect(function(added)
hair = conf.Character.Hair.Value
shirt = conf.Character.Shirt.Value
pants = conf.Character.Pants.Value
face = conf.Character.Face.Value
a = conf.Character.SkinColor.Value
wait(1)
player.Character:Destroy()
human = Instance.new("HumanoidDescription")
human.Shirt = shirt
human.Pants = pants
human.HeadColor = a
human.TorsoColor = a
human.LeftArmColor = a
human.RightArmColor = a
human.LeftLegColor = a
human.RightLegColor = a
human.Face = face
human.HairAccessory = hair
added:LoadCharacterWithHumanoidDescription(human)
end)
conf.Character.ChangeCharacter.OnServerEvent:Connect(function(player, str)
hair = conf.Character.Hair.Value
shirt = conf.Character.Shirt.Value
pants = conf.Character.Pants.Value
face = conf.Character.Face.Value
a = conf.Character.SkinColor.Value
if str == "OG Skin" then
hair = "16630147"
shirt = 2738262095
pants = 3140305384
face = 494299198
a = Color3.new(0.9,0.9,0.9)
else
hair = ""
shirt = 0
pants = 0
face = 0
a = Color3.new(1,1,1)
end
end)
conf.Character.Died.OnServerEvent:Connect(function(player)
-- old code was here, removing in release
end)
conf.Character.Died.OnServerEvent:Connect(function(play)
wait(2)
play:LoadCharacterWithHumanoidDescription(human)
end)
The “Died” part works fine.
Basically, there is a menu where you choose a character which sends values to the server and then you choose a team which is when it reloads the character however the camera stays where the original character was.