I found the solution, apparently doing the following lines causes the character position to go NaN…?
local StartPos = RootPart.Position
Camera.CFrame = CFrame.new(StartPos,Vector3.new(StartPos.X,0,StartPos.Z))
If anybody knows why it’s like that please tell me, but I guess I’ll stick to TweenService zooming out when spawning.
I encountered a similar problem yesterday. Hopefully my documentation of my own NAN issue helps you out!
NobleBuild
(awkwardrobloxdude)
#23
Have you tried constructing a new SpawnLocation with its position set to the location of the player’s feet, spawn them at that spawn, then destroy?
It would be the same as teleporting the player by changing their CFrame, which doesn’t work.
You were dividing the position axis by 0, though I wasn’t dividing anything.