I want the CurrentCamera of the player to return back to the player's Humanoid. So i wrote this code:
camera = game.Workspace.CurrentCamera
player = game.Players.LocalPlayer
camera.CameraSubject = player.Character.Humanoid
camera.CameraType = 'Custom'
The code is written in a LocalScript and it is cloned into the player's backpack, but it still doesn't work. plz help! :)

3 comments
You'll want to set the CameraType first. However, it seems to work fine no matter how I test it. Maybe you're setting your cam to another mode AFTER this loads? You may also need a small wait in-between setting the mode and setting the subject.
the script works perfectly when i disble it and put it in the backpack then enable it.
Put a small wait at the top and see what happens.