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

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

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?

3 comments

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

0

Yes, that was the problem. Thank you!

0

if you had a script deleting the character, why not set CharacterAutoLoads to false? (member of Players)

1 answer

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