Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

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

Asked by 7 years ago

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! :)

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. Azarth 3141 — 7y
0
the script works perfectly when i disble it and put it in the backpack then enable it. Worthy0ne 68 — 7y
0
Put a small wait at the top and see what happens. Azarth 3141 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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

Ad

Answer this question