Hi so I am a beginner scripter and I'm attempting to make a titan shifting script from 'Attack On Titan. I made the basics of it and it works all the way into shifting into the actual model that I can move with. After a few seconds though the model disappears and I get respawned.
The following is the code used to transform into the model:
local NewCharacter = game.Workspace.AT --(Model, stored in Workspace to troubleshoot this)
NewCharacter:Clone()
NewCharacter.Parent = workspace
game.Workspace:WaitForChild("AT")
wait()
Player.Character = game.Workspace.AT
Like I said, after a few seconds it just respawns me and deletes the entire model from the Workspace. Any help with this would be appreciated as I have been struggling on this for hours and my knowledge of scripting is not yet good enough to fix this error myself.

3 comments
Unfortunately this did not fix my issue. I cannot use this as a local script because it's apart of an actual script (Which contains all of the code for the transformation) that activates by RemoteEvent using a local script.. I did try to replace the Player.Character with your suggestion but I was given the error "'attempt to index nil with 'Character' ".
Sorry but I tried my best to help! I will contact other person soon to fix your problem ASAP. Thanks for reading!
It's alright! Thank You for taking the time to respond and try to help me anyway.