Wondering why this script is affected by camera changes + how to avoid it

Hi! I’m writing a script that saves a player’s location and loads them back in in the same spot. This script works on its own in a baseplate, but when I put it in my game with scripts that change the camera’s properties, the script breaks and won’t move the player. I turned the scripts off and it worked again. I have no idea why this happens, but I’m hoping someone does know. Also, if anyone has solutions to fix this problem, please let me know.

local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("PositionDataStore")
game.Players.PlayerAdded:Connect(function(player)
	local positionTable = DataStore:GetAsync(player.UserId)
	if positionTable ~= nil then

			local position = CFrame.new(positionTable.x, positionTable.y, positionTable.z)
		player.CharacterAdded:Connect(function(character)

		game:GetService("TweenService"):Create(character:WaitForChild("HumanoidRootPart"),TweenInfo.new(0.1),{CFrame = position}):Play()
	end)	
	else
		print("player info = nil")
	end
	player.CharacterRemoving:Connect(function(character)
		local success, errormessage = pcall(function()
			local rootPosition = character.HumanoidRootPart.Position
			local positionTable = {
				x = rootPosition.X, 
				y = rootPosition.Y, 
				z = rootPosition.Z
			}
			DataStore:SetAsync(player.UserId, positionTable)
		end)

		if success then
			print("success")	
		else
			print("fail")
			warn(errormessage)
		end
	end)
end)