Camera Manipulation script works only in Server view

So here is the script

game.Players.PlayerAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		char.Humanoid.Died:connect(function()
			repeat wait()
				game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
				until game.Workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable
			game.Workspace.CurrentCamera.CFrame = game.Workspace.Cameras.cam1.CFrame
			print("dead")
	end)
	end)
	end)

I checked multiple tutorials and edited it but the camera’s CFrame only goes to the camera part when viewed in Server mode. In Client, I just see my character dying.

Is it something I need to turn on like HTTPS service?

also it only happens when the character dies*

lol? you can’t edit a clients currentcamera via the server try it in a localscript.

local Players = game:GetService("Players")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

Character:WaitForChild("Humanoid").Died:Connect(function()
	repeat wait()
		game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
	until game.Workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable
	game.Workspace.CurrentCamera.CFrame = game.Workspace.Cameras.cam1.CFrame
	print("dead")
end)
1 Like