Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i properly return the CurrentCamera back to the player?

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

0

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.

0

the script works perfectly when i disble it and put it in the backpack then enable it.

0

Put a small wait at the top and see what happens.

1 answer

Try not setting the camera subject to the humanoid, but just the player in general.

This discussion is preserved as it was. New answers, comments, and votes are closed.