I made a script in Workspace that morphs you into a custom character when touching a part, however I added debounce to the script so that the game doesn’t lag.
I was wondering if there was a way to keep the morph as your character even after resetting and no, I don’t want the morph to happen when you first join the game.
Whenever I use a local script in starterGui, your original character doesn’t disappear. I tried adding a Character:Destroy() but that just resets the character.
Here’s the script in workspace
local debounce = false
local model = game.ReplicatedStorage.BallCharacter
workspace.FunctionParts.CustomCharacter.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if hit.Parent == player.Character and player.Character.Humanoid.Health > 0 and not debounce then
debounce = true
local oldchar = player.Character
local newchar = model:Clone()
newchar:SetPrimaryPartCFrame(oldchar.PrimaryPart.CFrame)
player.Character = newchar
newchar.Parent = workspace
end
end)