So basically I'm trying to make a customize character thing where a player will customize their character on a model and when they press done the model is copied to StarterPlayer and their health is set 0 so next time they respawn they become the character they made. This usually works well but for some reason its not working no matter what I do.
This is a localscript inside a ButtonGui that gets the model from the workspace called "StarterCharacter" its showing no errors whatsoever and I've rewrote it in a new game with the model and no matter what I do I get the same result of my character not changing after death
local button = script.Parent
button.Activated:Connect(function()
game.Workspace.StarterCharacter:Clone().Parent = game.StarterPlayer
wait()
game.StarterPlayer:FindFirstChild("StarterCharacter")
if true then
wait(1)
game.Players.LocalPlayer.Character.Humanoid.Health = 0
end
end)
