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

Custom Camera not turning?

Asked by 4 years ago

I have this script:

local Camera = game.Workspace.Camera
local Player = game.Players.LocalPlayer

script.Parent.MouseButton1Down:Connect(function()
    Camera.CameraType = 'Custom'
    Camera.CameraSubject = nil
end)

Which basically makes the camera go back to the player. However, when it goes to the player, I can't turn the camera, instead, it's like fighting with me to go back. I'm not too sure what I've done wrong.

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

First, is this LocalScript or normal one. Second, in line 5 you can't change camera type by using string, you should use Enum values, here is some change to you script: camera.CameraType = Enum.CameraType.Custom

EDIT: So I have read you old question, but the answer is wrong because like I say before.

EDIT2:

Ok, the problem here is you should change CameraSubject like this: Camera.CameraSubject = Player.Character:FindFirstChildOfClass("Humanoid")

EDIT3: Another solution, do not change the CameraSubject :

  • I gonna go to bed, I tired now :/
0
It's a LocalScript and it is still not working even after I changed it. ii_BlueAviation 8 — 4y
0
Also, it does no difference when I do "camera.CameraType = Enum.CameraType.Custom". It goes back to the normal camera like the old one but does not turn also like the old one ii_BlueAviation 8 — 4y
0
Wait, why you change the CameraSubject Block_manvn 395 — 4y
0
Im edit it, check it now. Block_manvn 395 — 4y
View all comments (7 more)
0
Edit again, sorry :( Block_manvn 395 — 4y
0
Ah, it's still not working weird ii_BlueAviation 8 — 4y
0
oh lemme check it again ii_BlueAviation 8 — 4y
0
still the same :/ ii_BlueAviation 8 — 4y
0
Ok, why don't you ask someone better than me. Block_manvn 395 — 4y
0
Alright ii_BlueAviation 8 — 4y
0
Why don't you do not add the CameraSubject Block_manvn 395 — 4y
Ad

Answer this question