Camera resets in custom Character

https://gyazo.com/e960d9f9984ee01709246a5809c47997
how do I stop The camera resets every time I put a custom character
Code :

local c = char:Clone()
local Root = player.Character.HumanoidRootPart
        
c:PivotTo(Root.CFrame)
player.Character = c
c.Parent = workspace

You just made a post for this, can you read the reply on the other one?

I did but, your thing won’t work because Roblox over rides any modifications if it’s not scriptable.

Did you add a wait? It works for me.

let me test it give me a second

Didn’t need to add a wait, Thanks. But I encountered a new problem when a player sends a remote to server and the client changes his camera cframe while this delay is happening how do I sync it

Like I said, add a wait.

Also, your other post has no solution, you should give someone it.

The other post had another question that I solved. anyways about this one how does a wait help my problem is

Client(Send Current camera CFrame) → Server → Tell client to set recieved CFrame

how do I solve for the delay between ->server->Client

Keep in mind one fixed time wait is not the solution because delay time differs

Could you show your code? If you did it the way I specified earlier there should be no delay.

can you show me how you did it?

The way I am doing it :

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player,cf)
local c = char:Clone()
	local Root = player.Character.HumanoidRootPart

	c:PivotTo(Root.CFrame)
	player.Character = c
	c.Parent = workspace
	print("WEWEWEW") -- prints 
	game.ReplicatedStorage.RemoteEvent:FireClient(player,cf)
end)

but some why fire client doesn’t run and no fire client reached and if I remove player.Character = c it runs good

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function(cf)
	print("Rec")
	workspace.CurrentCamera.CFrame = cf
end)
``` print doesn't run

nvm solved it by changing the script parent, anyways the camera problem is still on

Please just send your client code. This isn’t how I said to implement it.

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function(cf)
	print("Rec")
	workspace.CurrentCamera.CFrame = cf
end)

game:GetService("UserInputService").InputBegan:Connect(function(e)
	if e.KeyCode == Enum.KeyCode.E then
		game.ReplicatedStorage.RemoteEvent:FireServer(workspace.CurrentCamera.CFrame)
	end
end)


btw I do this because if I set Player.Character to something inside of the remote event in the server the client changes the camera subject thus adjusting beforeI fire a remote event is wrong

Client code:

game:GetService("UserInputService").InputBegan:Connect(function(e)
	if e.KeyCode == Enum.KeyCode.E then
		local prev_cframe = workspace.CurrentCamera.CFrame
		game.ReplicatedStorage.RemoteEvent:FireServer()
		
		task.wait() -- Might not be needed
		workspace.CurrentCamera.CFrame = prev_cframe
	end
end)

Server code:

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
	local Root = player.Character.HumanoidRootPart

	local c = char:Clone()
	c:PivotTo(Root.CFrame)
	c.Parent = workspace

	player.Character = c
end)

the remote event doesn’t yield and as I said roblox re adjust the camera subject thus it resets on a camera exactly behind the character

tried it, doesn’t work zzzzzzz

Yeah, which is why I said to add a wait at least five times.

This doesn’t take in account that you can just set the CFrame to whatever you want.

You can try making the wait longer or replacing it with .CharacterAdded:Wait()