I have this script that sets the character to a model I made with humanoid etc. etc. all set up. The player is able to control the model for a good few seconds, then out of nowhere the character suddenly respawns. I've checked if the humanrootpart was the source but it wasn't.
This also only happens in game and not studio. I've tried put waits on the humanoid and humanoidrootpart but it doesn't work. Also their no error log for why this happens.
local player = game.Players.LocalPlayer
local char = player.Character
local camera = game.Workspace.CurrentCamera
CachedCharacter = player.Character
local BeastM = game.ReplicatedStorage.Titans["Beast Titan"].Beast:Clone()
game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
BeastM:WaitForChild("HumanoidRootPart")
wait()
BeastM.Parent = game.Workspace
player.Character = BeastM
camera.CameraSubject = BeastM["Head"]
camera.CameraType = "Follow"

2 comments
don't wait for child and set it automatically to humanoid. the wait may delay the transfer and thus causes the player to die
Didn't work, still after few seconds the character respawns.