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

Why didn't the camera move as much as it should?

Asked by
Vik954 48
6 years ago

Almost everything succeed, but the camera didn't move as much as it should.

I have a LocalScript inside the StarterPlayerScripts, in which the camera is moved to the position -300, 200, 0, like this:

local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Custom
camera.CFrame = CFrame.new(-300, 200, 0)

"The camera should be upper", I said to myself. And then I've set the Y position to 350 instead of 200. When I started the game again, I saw the exact thing!

Maybe I just saw wrong, so I tried to put the camera's Y position to 10000, and I should not see the ground platform. I played the program again, and I saw the same thing as with the other positions!

And remember, I had a script deleting the character which worked, the script in which the camera was positioned was a LocalScript, not a Script, the script was in the StarterPlayerScripts and there was't any error.

What is the problem?

0
CameraType.Custom does uses Roblox's default camera scripts. You should set Camera.CameraType to Enum.CameraType.Scriptable for an actual self "custom" made camera. If you want a different behaviour: https://developer.roblox.com/api-reference/enum/CameraType GoldAngelInDisguise 297 — 6y
0
Yes, that was the problem. Thank you! Vik954 48 — 6y
0
if you had a script deleting the character, why not set CharacterAutoLoads to false? (member of Players) the8bitdude11 358 — 6y

1 answer

Log in to vote
0
Answered by
Vik954 48
6 years ago

Answered!

Ad

Answer this question