I have created a system where the player joins, they see a loading screen for a few seconds and then after that a character customization gui pops up and they can customize their character, and press complete and go around and play with it. I’ve got all this down but I have no clue how to make it so that when the player respawns, they have the character that they customized and not the default one.
Here is a piece of my code, in a local script inside of StarterPlayerScripts
repeat
wait(2)
until game:IsLoaded() == true
local char = game.Workspace:WaitForChild(player.Name)
local hum = char:WaitForChild("Humanoid")
local function teleportPlayer(newPosition)
if hum then
hum.Parent.HumanoidRootPart.CFrame = CFrame.new(newPosition)
end
end
walkspeed = hum.WalkSpeed
hum.WalkSpeed = 0
rs.Cutscenes.Play.Event:Connect(function()
print(char.Name)
if char:FindFirstChild("HumanoidRootPart") then
char.HumanoidRootPart.CFrame = game.Workspace.CharacterCustomize.CharacterCustomizeSpawn.CFrame + Vector3.new(0,3,0)
end
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CF:WaitForChild('MaleCam').CFrame
player.PlayerGui.CharacterCustom.Frame.Visible = true
UI.Event:Connect(function(Button, currentPage)
if Button == "Finish" then
game.StarterPlayer:FindFirstChild("StarterCharacter"):Destroy()
local newsc = game.Workspace:FindFirstChild(char.Name)
newsc.Archivable = true
local NEWStarter = newsc:Clone()
newsc.Archivable = false
NEWStarter.Parent = game:GetService("StarterPlayer")
NEWStarter.Name = "StarterCharacter"
print("Character Customized!")
FadeIn()
sorry for the lengthy video, just skim through and you will be able to see what I am talking about