The reasons why people like playing games in Roblox is because this online gaming platform has a lot of features. Those features are fun and awesome. So, no wonder why Roblox users can spend their time for a long time in Roblox. Besides having a lot of games in a wide variety of genres, people also can explore anything including using Roblox Studio to create their own games.
Talk about creating games, we know that several things must be considered. Now, in this opportunity, we are going to try to talk about Camera particularly CurrentCamera. A view of the 3D world is set bu Camera object. In an example of the game, each client owns its Camera object and it is associated with it. Camera object is present only upon the client of the viewer and you can find it in that user’s local Workspace. Therefore, it is not able to be edited directly from the server.
In this latest versions of the game, the only way to be able to access the Camera object of a client is via a LocalScript that runs on that client. You have to know that every specific Camera object of a client can be accessed through the Current Camera property of its local Workspace. It assumes your code is working in that specific client. The state of Camera can be defined as we explain below.
- The CFrame property shows the orientation and position of the camera.
- The Focus property shows the point of the camera is looking at.
- The Camera Type property shows the action that the game engine should perform in the Camera every frame.
- The FieldOfView property, a number, shows the angle that the user is able to view the sides of the Camera.
- An internal roll amount that can be set by using the method of SetRoll.
Then, how about CurrentCamera? This is a property of Workspace and it is a link to an object. It can be meant that the object is links to is a Camera. It is the Camera which is included to the local player. The word “local player” brings the fact that only LocalScript which can get access to it. But, in case you want to edit the CurrentCamera, it is very simple and it can enhance your game a lot.
So, how to add objects to it? You are able to add objects to the current camera easily. When an object is parented to CurrentCamera, you need to know that only the local player who is able to view and interact with it. It can be functional for things like gates which are only visible by certain players. This method is not good anymore since parenting objects to Workspace via LocalScripts has the same effect.
Well, to know more about this, it is better for you to ask to someone who expert in this field. You are able to start by joining with a group or forum about Camera or about Creating Games. It will very fun to discuss about that and also it can add new friends for you.