|
I don't comprehend the wiki, my head is also about to explode from reading the wiki. |
|
|
It would be great too if you guys are willing to explain the uses of the three |
|
|
Vector3 just a set of 3 numbers.
Its commonly used for Position but also things like size or velocity.
Its just an x, y, and z put together into 1 value.
CFrame is a set of numbers that represents a position and rotation of an object.
getService() basically checks if a service exists, if it does, it returns the service, if not it creates the service and returns it.
example
Instance.new("Team", game:getService("Teams"))
Run that in the command bar and watch the Teams service pop up.
But run it again and notice it still creates a new 'Team' but not a new 'Teams' folder. |
|
BanTechJoin Date: 2015-12-31 Post Count: 886 |
Vector3 is a three-dimensional vector property describing a point in the 3D space. You will find it used for properties such as Position, as the part's position is a point in the 3D space.
CFrame is a much better positional property because it incorporates rotational matrices, so you can set an instance's position and rotation with this one property. You won't find it in the properties panel, but you can set it with scripts. The camera uses a CFrame property called CoordinateFrame.
GetService is a method of the data model, and is used to load in additional services such as the MarketplaceService, ContentProvider, etc. It can also be used to get a reference to existing services, such as game:GetService('Players') is the same as game.Players |
|
|
|
'Vector3 is a three-dimensional vector property describing a point in the 3D space. You will find it used for properties such as Position, as the part's position is a point in the 3D space.'
No Vector3 not a point in 3D space
Its 3 numbers, an x, y, and z
Position uses it for 3D space
Size uses it for...Size |
|
BanTechJoin Date: 2015-12-31 Post Count: 886 |
Oops |
|
|
Although I suggest against it, GetService is useful if you are changing the names of services.
Changing the Lighting service name to something else can still be accessed by game:GetService("Lighting") |
|
|
Why would anyone change a services's name?
Anyways, Vector3 and CFrame are global tables used for things from posts above |
|
indeimausJoin Date: 2014-09-01 Post Count: 4285 |
Vector3 is just a table value with an x y and z. It's very used for things like size and position. CFrame is vector3 but less restrictive if that makes any sense. If you use Vector3.new for a position if there's anything in the way it will be put on top of that but CFrame.new would put right at the position. CFrame also lets you rotate things but Vector3 can't.
As far as I understand it GetService is used to get things in game from server and local scripts. |
|
|
Why does everyone think that is all that GetService is good for?
GetService will attempt to initialize a service that doesn't yet exist. For example, if I remember right, RunService isn't accessible until you use GetService.
|
|
Hedr0nJoin Date: 2016-01-05 Post Count: 1524 |
Vector3 is not a point in space, it should be thought as offset from 0, 0, 0 |
|
|
@Jarod
We both said that...? |
|
|
No, you only thought you said it, and I only didn't think you said it.
Technically though, according to the Observation Effect, it was both there and not there until I actually read your post.
|
|
|
Lol that's not what that means Jarod
Anyways, OP:
One thing to note is that Vector3 is a datatype for... vectors. Find out what a vector is in the math world, and why it's useful, here: https://www.mathsisfun.com/algebra/vectors.html |
|
|
I know. The observation effect doesn't apply here.
Although I suppose it could. Anything is possible, we just take the most supported evidences, proofs, and theories to heart.
|
|