Hey guys! If you have any questions or just want to meet / connect with me and other roblox devs. Be sure to join the discord server! discord.gg/FKcSyRh
it wasn't too confusing for me cuz I already read up on cframe prior to this but I admit I am still curious and confused as to what the other 4values mean
I thought the first thing you would mention is moving models with the :moveTo function or the :setPrimaryPartCFrame () functions but it sounds like your saving it for a dif vid
TheDevKing in the thumbnail: It's just CFrame, don't be scared! TheDevKing in the start of the video: CFrame, you got this! TheDevKing at the end of the video: And this is all you need to know about quantum physics. Next tutorial will be about how to make a time machine! P.S. Jk, tutorial was very easy to understand! Thank you, I really got confused about CFrame before this, but now, I understand it!
@@MemeDealer-ls6pf Was bound to happen. Bunch of people read this comment so the fact that one year later someone would be reading about quantum physics isn’t that surprising really.
If anyone's wondering why "print(newCFrame)" prints out the same values, it's because "newCFrame" is the variable, so it won't change. The way to print out the part's actual current CFrame is by doing print(part.CFrame) part.CFrame = part.CFrame * newCFrame print(part.CFrame) I know I'm very late, but I hope there are still people wanting to be a developer.
To those still confused: Radians are just another unit for angles. Just like for length we got inches and feet, for angles there's degrees and radians.
THAT JUST CONFUSES ME EVEN MORE! INCHES ARE LESS THAN FEET! DOES THAT MEAN DEGREES ARE LESS THAN RADIANTS? BUT IN THE VIDEO THEY WQERE THE EXACT SAME!! UGH....
bro your tutorials are the best out there. I would really do something for you but im just a random stranger aka fan. These tutorials are so good, that my scripting knowledge increased alot. your advanced tutorial is ACTUALLY advanced, not like if statements in the advance tutorial. I never understood CFrame better than this tutorial. Thank you, DevKing
I made a loop to make a part rotate infinitely. local part = script.Parent local NewCFrame = CFrame.Angles(0,math.rad(3),0) -- change the 3 to whichever degree you want (bigger number = faster rotation) while true do wait() part.CFrame = part.CFrame * NewCFrame end
Radians are basically fractions of a full 2D circle (360 degrees) So if an object is rotated 180 degrees, it is halfway through its entire rotation. In other words, the rotation of the object is 1/2 or 180/360 in radian.
Not quite....there are 2pi radians in the circumference of a circle, hence the equation C= 2pi *r. Therefore, 2pi radians = 360 degrees and the most useful one, pi radians, = 180 degrees or in other words 3.14 radians = 180 degrees
It's not a fraction. Ok is equal to 180, so 180 = pi. That means 2pi = 360, because it's 180 x 2 (so you multiply ok by 2 also) so 45 = pi\4, because 45 is 180 divided by 4
I've tried forcing myself to learn to code for years. I always met an obstacle that would demotivate me for months and I am very forgetful. Something about the format of these videos makes it really understandable, and maybe I'll actually be able to do something with code outside of school.
Same here, I've been trying to learn Django for almost a year, and i always demotivate and get back after two or three months, but everytime it's easier to learn new stuff.
I know this reply is 2 years late but something that can help is to make quizlets, or any other studying app of your choice. After typing the same commands over and over, it really sticks in your brain. Another thing you could do is force yourself into a schedule by getting an online class with a teacher, if you are willing to pay. Knowing that someone is checking your work (and silently judging you) is a great motivator!
not sure, but its the exact same thing. It's just the way it was written. I kind of explained in the video. You might be able to find something online tho
@@conradpierce8994 true it is my fault. But hey, I can't change the past but I can change the future. I will be uploading every other day so be sure to stay tuned for that! :)
If you want to learn more about CFrame, here are some links from the Developer Hub about CFrames: Understanding CFrame: developer.roblox.com/en-us/articles/Understanding-CFrame CFrame Math Operations: developer.roblox.com/en-us/articles/CFrame-Math-Operations CFrame: developer.roblox.com/en-us/api-reference/datatype/CFrame
It make's me depressed that you do not have more subscribers. You put lots of time and effort into making videos for people, and your not even making any money off of it. You take the time of day to teach random people how to achieve dreams of developing games, and you make them in high quality. I respect you.
Thanks a lot man! I appreciate you looking out for me but its okay loI have another roblox related youtube channel which gets millions of views. This one is just for fun and to help people learn scripting because whenever I first learned I always wished I could have someone who could help me and would upload videos regularly and explain everthing.
@@David12754 yea i know but i stopped working on this project now i m working on crossy road and it will be name cross the road. I started work on crossy the road then on Mario and i returned to cross the road :)
Thank you so much for this series of videos! They are really helpful, I have been looking for scripting tutorials for a long time. You are really good at explaining.
At 14:10, the value isn't changing because you were only referencing newCFrame, which didn't change. "newCFrame" was just your CFrame.Angles(). To see the change, you would've needed to do print(part.CFrame) afterwards. I hope this clears up any confusion anyone may have had on these parts. TheDevKing, I really appreciate what you're doing for the Roblox community, but please please please be more thorough in your tutorials. Maybe it would help to plan out each point as well as what examples you're going to use? I hope you see this as constructive criticism. Edit: I realized that I misinterpreted a part that I previously explained. I've fixed this, and everything else in the comment is still valid.
hi, so i took a break from programming and i did not understand cframe. now i wanna come back and you have just explained cframe so well i get it now. Thank you so much for making these tutorials and allowing me to learn to program
Another good video as always. I am becoming more independent with scripting souly because of your videos and starting to go to the Developer Hub for scripting! Thanks a bunch!
If your a small kid who doesn’t understand radians well simply put it’s an another way of measuring angle The conversion of angles to radians is Angle you want multiplied to pie(22/7) and divided by 180 Eg if we want 45 in radians 45*22/7 /180 = what ever value comes Put we don’t want to do this ever time in script Therefore math.rad does that for us And yes you just learned something I learned in highschool in about 5mins
For a shortcut, you can just do local movingPart = script.Parent movingPart.CFrame *= CFrame.Angles(0, math.rad(45), 0) using *= is the same as movingPart.CFrame = movingPart.CFrame * CFrame.Angles(0, math.rad(45), 0)
i found out how to rotate a part bymyself(didnt search it up) local part = script.Parent local newCFrame = CFrame.Angles(0,math.rad(3),0) while true do part.CFrame = part.CFrame * newCFrame wait() end the thing is the angles jus keeps on getting added up so when u run it in a while loop it starts adding up on the angle and starts rotating,also if u increase wait time more the rotating speed decreases and if u change the math.rad to lower u get a smoother rotation , idk if my explanation is ryt but i hope it helps
Its pretty easy i understood it in first attempt bcuz of this guy, don't know why it sounds difficult, but to simplify it, emma show you my note. Cframe:- It is same as Vector3 but with position and rotation. e.g:- *Part.CFrame = CFrame.new(0,1,2)* The new indicates that its a position To use CFrame for rotating you do *Part.CFrame = Cframe.Angles( , , )* The Angles indicates that its a rotation. But you dont just put numbers you do :- *Part.CFrame = CFrame.Angles(math.rad(1),math.rad(1),math.rad(3))* This math.rad is very important as this converts the degress of rotation into the mathematical form for Roblox to use easily. Now this resets the position too, because we never told it to have the same position as before. So, to have the part have same position, we do:- *Part.CFrame = Part.CFrame * CFrame.Angles(math.rad(1),math.rad(2),math.rad(45)* this star sign is a multiplication sign in computer this is a must for the script to have the same position.
I use to not understand why it moved down but after rewatching several times, I realised that the cframe.angles restarts the cframe of the part which means that it's position will remain at 0
This helped me when I was trying to shoot out a hand, it would always be turned the wrong way depending on where I was facing, but cframe fixed that. Thanks 😀
Cframe is basically all it's coordinates combined but Vector3 is only for getting 3 values for example: part.Position = Vector3.new(1,1,1) it would change it's position and with orientation (replaced with position) will rotate it Cframe is (Position,Orientation,etc...) so these scripts would be the same for example: :Same Outcome 1: part.Position = Vector3.new(1,1,1) part.Orientation = Vector3.new(1,1,1) :Same Outcome 2: part.Cframe = Cframe.new(1,1,1) part.Cframe = Cframe.Angles(1,1,1) hope this explained well
14:05 ish, it wasn’t displaying two different cframes since he was printing the variable called ‘newcframe’, not the actual cframe of the part. He should have printed ‘part.CFrame’ to those who were wondering
late but.. the reason it didnt work at 14:20 was because print(newCFrame) was assigned to the new angles of cframe, so instead you should've done something like this: local testCFrame = part.CFrame print(testCFrame) -- code goes here print(testCFrame) :)
what i wanted to use multiple movements? like as if i wanted it to move from 0, 0, 0 to 0, 5, 0 and then again to 0, 5, 2 or something like that? that would be extremely helpful! But still thanks for the tutorial! this helped alot.
The reason why you’d be seeing that huge ass decimal when printing it out is because the angle still remains represented in radians form. 45 degrees in radians is pi/4, which when divided amounts to that number.
for anyone wanting a challenge try to make the part rotate constantly for how to do this press read more local part = script.Parent while true do part.CFrame *= CFrame.Angles(math.rad(5),math.rad(5),math.rad(5)) wait() end
Bro this was very easy tbh, Its just like you said it. Its just a Vector3 value but along with position, you can change the part's orientation (rotate the part) too
13:39 The reason why the newCFrame is the same is because you never changed the value of 'newCFrame'. You only changed the value of 'part.CFrame' So what you wanna do is : print(newCFrame) part.CFrame = part.CFrame * newCFrame print(part.CFrame) If I'm correct.
Whenever I use math.random on my part it works but the orientation is all wrong. I'll put it at CFrame.Angles(math.rad(90), math.rad(45), (0)) and then it comes out as 45, 90, 90. Can anyone help me? i've been stuck on this problem for too long
@@umka9189 idk now i quitted roblox scripting because i don't like roblox engine much its limited, i went to unity coding which uses C# but I still have experience with lua a bit. What I remember is you can't change orientation with vector3, only CFrame can. Though I highly advise you to look it up.
Hey guys! If you have any questions or just want to meet / connect with me and other roblox devs. Be sure to join the discord server! discord.gg/FKcSyRh
btw, it's not 10 or 11, it's 12
TheDevKing Also, PLEASE PLEASE PLEASE DO A TUTORIAL ON THE WEIRD, TOO COMPLICATED, MATRIX PART OF CFRAME.
it wasn't too confusing for me cuz I already read up on cframe prior to this but I admit I am still curious and confused as to what the other 4values mean
I thought the first thing you would mention is moving models with the :moveTo function or the :setPrimaryPartCFrame () functions but it sounds like your saving it for a dif vid
i was trying to hack now i am creating an obby
TheDevKing in the thumbnail: It's just CFrame, don't be scared!
TheDevKing in the start of the video: CFrame, you got this!
TheDevKing at the end of the video:
And this is all you need to know about quantum physics. Next tutorial will be about how to make a time machine!
P.S. Jk, tutorial was very easy to understand! Thank you, I really got confused about CFrame before this, but now, I understand it!
Lel
I am more frustrated then anything.
Such a coincidence I was learning quantum physics before reading the comment.
@@MemeDealer-ls6pf Was bound to happen. Bunch of people read this comment so the fact that one year later someone would be reading about quantum physics isn’t that surprising really.
@@lunyxappocalypse7071 SAME I AM SO CONFUSED IMMA SKIP AND COME TO THIS LATER ON!
If anyone's wondering why "print(newCFrame)" prints out the same values, it's because "newCFrame" is the variable, so it won't change. The way to print out the part's actual current CFrame is by doing
print(part.CFrame)
part.CFrame = part.CFrame * newCFrame
print(part.CFrame)
I know I'm very late, but I hope there are still people wanting to be a developer.
the fact that this person is still helping people is really nice, this helped me out :)
yup, it works
Still helpful, I do wonder what the other values are
There is and thats me :)
thanks a lot :)
Wasn't confusing at all pretty easy to understand tbh
that's great man! Keep it up, you can probably learn scripting better than most people if you thought this was easy lol
same
Hey Khy!
Same xd
Its very basic and simple...
"theres 10 values"
"oh wait theres 11"
"im soryy guys theres 10 haha"
My guy there's 12
Theres 13
@@chrismelon8192 no theres 12 lol
@@akshitagoel6762 No, there’s 9
@@frannncoco -31.5 5 -20 1 0 0 0 1 0 0 0 1
thats 12 numbers
Y’all idiots peanut sized brains
"don't be scared"
"im confused"
"you just have to put it there idk"
*internal scared screeching*
"Cframe is better to use because you use it more often" -The Dev King
To those still confused: Radians are just another unit for angles. Just like for length we got inches and feet, for angles there's degrees and radians.
radians are the arced length of a unit circle whereas degrees are used to measure angles
THAT JUST CONFUSES ME EVEN MORE! INCHES ARE LESS THAN FEET! DOES THAT MEAN DEGREES ARE LESS THAN RADIANTS? BUT IN THE VIDEO THEY WQERE THE EXACT SAME!! UGH....
@@RubyYTer radians express degrees in terms of pi. 2 pi describes a whole revolution around the unit circle
Fun fact: Radians ≈ Degrees / 57
@@RubyYTer 2 units of measure can have the same value. its just that inches and feet dont
bro your tutorials are the best out there. I would really do something for you but im just a random stranger aka fan. These tutorials are so good, that my scripting knowledge increased alot. your advanced tutorial is ACTUALLY advanced, not like if statements in the advance tutorial. I never understood CFrame better than this tutorial. Thank you, DevKing
I made a loop to make a part rotate infinitely.
local part = script.Parent
local NewCFrame = CFrame.Angles(0,math.rad(3),0) -- change the 3 to whichever degree you want (bigger number = faster rotation)
while true do
wait()
part.CFrame = part.CFrame * NewCFrame
end
update on scripting journey?
@@yourmother5706 lua and roblox are both shit, learn c# and unity if you want to be a game dev. Being a game dev is a shit life anyway. learn rust
@@DiRt51784 sure how u doing
@@DiRt51784 I’m trying to gather a team of beginner scripters or builders
@@DiRt51784 I want everyone to help each other
Radians are basically fractions of a full 2D circle (360 degrees) So if an object is rotated 180 degrees, it is halfway through its entire rotation. In other words, the rotation of the object is 1/2 or 180/360 in radian.
Not quite....there are 2pi radians in the circumference of a circle, hence the equation C= 2pi *r. Therefore, 2pi radians = 360 degrees and the most useful one, pi radians, = 180 degrees or in other words 3.14 radians = 180 degrees
a radian is the angle formed when you get an arc of a circle that is the same length as the radius.
It's not a fraction. Ok is equal to 180, so 180 = pi. That means 2pi = 360, because it's 180 x 2 (so you multiply ok by 2 also) so 45 = pi\4, because 45 is 180 divided by 4
I mean pi not ok
my brain cant comprehend wut yall r saying
Hello!
I am very excited to learn with you!
Finally found someone who posts more regularly, Thank you!
I've tried forcing myself to learn to code for years. I always met an obstacle that would demotivate me for months and I am very forgetful. Something about the format of these videos makes it really understandable, and maybe I'll actually be able to do something with code outside of school.
Same here, I've been trying to learn Django for almost a year, and i always demotivate and get back after two or three months, but everytime it's easier to learn new stuff.
Same, with me trying to learn lua. I get demotivated just like you but still wanna continue.
I know this reply is 2 years late but something that can help is to make quizlets, or any other studying app of your choice. After typing the same commands over and over, it really sticks in your brain. Another thing you could do is force yourself into a schedule by getting an online class with a teacher, if you are willing to pay. Knowing that someone is checking your work (and silently judging you) is a great motivator!
@@notananimegirl lmao i gave up
@@kraai1152 you gotta try again. Do it for me (◕︿◕)
before :: what is CFrame its a position??
after watching this video :: Okey i know now what is cframe XD
im so happy bcuz i learned scripting from you
I think no one fucking cares
@@realprisec lmao
@@liamstudios1390 I don't know why I was this rude.
@@realprisec xD
Why does CFrame use multiplication to offset, and Vectors use addition?
not sure, but its the exact same thing. It's just the way it was written. I kind of explained in the video. You might be able to find something online tho
It's because CFrames are something called Matrices which you can't add together.
BearByte2 Can you explain to me what a matrices is?
Ahhgh, matrices matrices, it's just a linear algebra thing, vectors are like arrows, matrices are like tables! But i don't study linear algebra...
Dave's Codes Oh alright. Thanks
Why 👏🏻 are 👏🏻 you 👏🏻 so 👏🏻 under- 👏🏻 rated???
because he stopped uploading for months so I assume most of his viewers just left.
That's what I'm wondering lol
@@conradpierce8994 true it is my fault. But hey, I can't change the past but I can change the future. I will be uploading every other day so be sure to stay tuned for that! :)
If you want to learn more about CFrame, here are some links from the Developer Hub about CFrames:
Understanding CFrame: developer.roblox.com/en-us/articles/Understanding-CFrame
CFrame Math Operations: developer.roblox.com/en-us/articles/CFrame-Math-Operations
CFrame: developer.roblox.com/en-us/api-reference/datatype/CFrame
Tutorial on metatables
It make's me depressed that you do not have more subscribers. You put lots of time and effort into making videos for people, and your not even making any money off of it. You take the time of day to teach random people how to achieve dreams of developing games, and you make them in high quality. I respect you.
Thanks a lot man! I appreciate you looking out for me but its okay loI have another roblox related youtube channel which gets millions of views. This one is just for fun and to help people learn scripting because whenever I first learned I always wished I could have someone who could help me and would upload videos regularly and explain everthing.
TypicalHB hey just saw this lol this is the channel
@@TapWaterRBLX Thanks for the videos Tap, can ya do raycasting next? I am keen on learning that and your tutorials are really well explained!
Hey I noticed you have the snipping tool in your hotbar
There's a shortcut you can do now to open that up. It's Win + Shift + S
OHHHHHHHHHHHHHHHHH
No it Alt F4
i love you i could've gone my entire life without knowing that
Thx
@@emil1634 haha troll go BRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
I was confused by other youtuber but i finally understood when you explained
Thank you so much. I m making a game like a crossy road and now i know how to change my camera orientation.
What's your game going to be called?
@@aligamiles idk what s It going to be called but somthing like Mario
Wiktor Musiał Be careful with calling it Mario Roblox may take it down because of the Nintendo copyrights.
@@David12754 yea i know but i stopped working on this project now i m working on crossy road and it will be name cross the road. I started work on crossy the road then on Mario and i returned to cross the road :)
what the holy freak you can do that. okay im gonna start watching the video
If yall are wondering what a radian is, it's just 57.3° per 1 radian and Pi radians is 180 degrees so 2 pi radians is 360 degrees
I might be late to learn this but good video Man im Learning a lot from it!
Same bruh
never too late to learn how to script, hope you watched the beginner series tho lol XD
Thank you so much for this series of videos! They are really helpful, I have been looking for scripting tutorials for a long time. You are really good at explaining.
We got this brothers! Finished beginner series and only 18 videos remaining
Roblox scripting is the one time my trigonometry and physics classes ever came in handy.
At 14:10, the value isn't changing because you were only referencing newCFrame, which didn't change. "newCFrame" was just your CFrame.Angles(). To see the change, you would've needed to do print(part.CFrame) afterwards.
I hope this clears up any confusion anyone may have had on these parts. TheDevKing, I really appreciate what you're doing for the Roblox community, but please please please be more thorough in your tutorials. Maybe it would help to plan out each point as well as what examples you're going to use? I hope you see this as constructive criticism.
Edit: I realized that I misinterpreted a part that I previously explained. I've fixed this, and everything else in the comment is still valid.
thank u for posting this
Bro explains things so good, thanks man.
hi, so i took a break from programming and i did not understand cframe. now i wanna come back and you have just explained cframe so well i get it now. Thank you so much for making these tutorials and allowing me to learn to program
uahc belac
same
The values didn’t change because you are printing the same variable.
exactly
Actually the way code works is it runs by lines in order, so he printed the value before he rotated it, then he printed it after it was rotated.
Rocko 1004 ??? He was printing the exact same variable that he defined before.
THE KING he printed before he multiplied it with the angle and then after the multiplied it
Darren I know. He printed the same variable that never had its value changed.
Another good video as always. I am becoming more independent with scripting souly because of your videos and starting to go to the Developer Hub for scripting! Thanks a bunch!
If your a small kid who doesn’t understand radians well simply put it’s an another way of measuring angle
The conversion of angles to radians is
Angle you want multiplied to pie(22/7) and divided by 180
Eg if we want 45 in radians 45*22/7 /180 = what ever value comes
Put we don’t want to do this ever time in script
Therefore math.rad does that for us
And yes you just learned something I learned in highschool in about 5mins
For a shortcut, you can just do
local movingPart = script.Parent
movingPart.CFrame *= CFrame.Angles(0, math.rad(45), 0)
using *= is the same as movingPart.CFrame = movingPart.CFrame * CFrame.Angles(0, math.rad(45), 0)
Nice was just gonna search for a cframe tutorial
you make mistakes so confindently, thats why i love this channel
When Tapwater doesnt understand somthing, he says. Dont worry about that he he...
I think that CFrame and TweenService is a great mix
180 degrees = pi rad
the reason why the CFrame values were the same is because you were printing the variable ( CFrame.Angles(0,math.rad(45),0) ) and not the parts CFrame.
The dev king is definitely the funniest dev
Your the best! Thanks for all the scripting tutorials so far!
i found out how to rotate a part bymyself(didnt search it up)
local part = script.Parent
local newCFrame = CFrame.Angles(0,math.rad(3),0)
while true do
part.CFrame = part.CFrame * newCFrame
wait()
end
the thing is the angles jus keeps on getting added up so when u run it in a while loop it starts adding up on the angle and starts rotating,also if u increase wait time more the rotating speed decreases and if u change the math.rad to lower u get a smoother rotation , idk if my explanation is ryt but i hope it helps
I was waiting for this :D
Its pretty easy i understood it in first attempt bcuz of this guy, don't know why it sounds difficult, but to simplify it, emma show you my note.
Cframe:-
It is same as Vector3 but with position and rotation.
e.g:-
*Part.CFrame = CFrame.new(0,1,2)*
The new indicates that its a position
To use CFrame for rotating you do
*Part.CFrame = Cframe.Angles( , , )*
The Angles indicates that its a rotation.
But you dont just put numbers you do :-
*Part.CFrame = CFrame.Angles(math.rad(1),math.rad(1),math.rad(3))*
This math.rad is very important as this converts the degress of rotation into the mathematical form for Roblox to use easily.
Now this resets the position too, because we never told it to have the same position as before. So, to have the part have same position, we do:-
*Part.CFrame = Part.CFrame * CFrame.Angles(math.rad(1),math.rad(2),math.rad(45)*
this star sign is a multiplication sign in computer this is a must for the script to have the same position.
that helped me im actually taking notes rn ngl lol
I am confused! But I will rewatch the video on my computer because on my computer I just tend to concentrate more!
I use to not understand why it moved down but after rewatching several times, I realised that the cframe.angles restarts the cframe of the part which means that it's position will remain at 0
tysm
This helped me when I was trying to shoot out a hand, it would always be turned the wrong way depending on where I was facing, but cframe fixed that. Thanks 😀
This was a good video thank you! I am trying to gain a better understanding in learning CFrame!
Cframe is basically all it's coordinates combined but Vector3 is only for getting 3 values for example:
part.Position = Vector3.new(1,1,1) it would change it's position and with orientation (replaced with position) will rotate it
Cframe is (Position,Orientation,etc...)
so these scripts would be the same for example:
:Same Outcome 1:
part.Position = Vector3.new(1,1,1)
part.Orientation = Vector3.new(1,1,1)
:Same Outcome 2:
part.Cframe = Cframe.new(1,1,1)
part.Cframe = Cframe.Angles(1,1,1)
hope this explained well
Thanks
*confusing Spanish noices*
I'm bout to learn a new civilization of coding after this guy finishes his series
14:05 ish, it wasn’t displaying two different cframes since he was printing the variable called ‘newcframe’, not the actual cframe of the part. He should have printed ‘part.CFrame’ to those who were wondering
In mathematics radians are used to measure angles
i think should use CFrame when you want to change rotation but you should use Vector3 when change position
4:19 the rotation thing looked like a heart
Here is explanation about radian to degrees: pi = 180 degrees, pi/2 = 90 degrees, pi/3 = 60 degrees, pi/4 = 45 degrees, pi/6 = 30 degrees.
"If you want the degrees to be in your here"
Nice Job
Thank you so much.. Your user input service tutorial was the best it made me learn ALOT
Thank god I have learned about radicals multiple years before this video, or I wouldn't have understood "math.rad(45)" very well XD.
late but..
the reason it didnt work at 14:20 was because
print(newCFrame) was assigned to the new angles of cframe, so instead you should've done something like this:
local testCFrame = part.CFrame
print(testCFrame)
-- code goes here
print(testCFrame)
:)
radians are basically another way to represent angles, accept using pi. 45 degrees is the same as pi/4 radians.
3:50 there is 12
lol
lol
Lol
lol
Fun tip for everyone, πRad=180°, (1/2)πRad=90° and (2)πRad=360°
We're on advanced scripting tutorials and he's teaching vectors and how to start a game without spawning in, I seriously love this dude. 😂
1 radian/rad = 57.3 degrees approximately 360/ 2 pi which equals 360/6.28
no way people are saying cframe is hard, i swear i finished this tutorial and i understood it very easily idk why people find it hard
what i wanted to use multiple movements? like as if i wanted it to move from 0, 0, 0 to 0, 5, 0 and then again to 0, 5, 2 or something like that? that would be extremely helpful!
But still thanks for the tutorial! this helped alot.
14:19, no it won't change since you are printing the same variable.
The reason why you’d be seeing that huge ass decimal when printing it out is because the angle still remains represented in radians form. 45 degrees in radians is pi/4, which when divided amounts to that number.
for anyone wanting a challenge try to make the part rotate constantly
for how to do this press read more
local part = script.Parent
while true do
part.CFrame *= CFrame.Angles(math.rad(5),math.rad(5),math.rad(5))
wait()
end
Idk how but i always undarstand whatever you teach me
Thanks for the tutorial it helped me with cframes
It sounds like he's saying 'It is the dev king year'. Can't disagree.
i think cframe is important when it comes to part events
Thank you devking, i can now animate ACS!
with the help of this. i've proceed to spin blocks around using repeat loops
Me: Using black theme in roblox studio
Also me: Watches this vid
Also my eyes: Flashbang
@kelp in rn outside ;-;
CFrame is a cosplay of Vector3 but this cosplay have more abilities than the Vector3 such as change orientation of a part
Bro this was very easy tbh, Its just like you said it. Its just a Vector3 value but along with position, you can change the part's orientation (rotate the part) too
13:39
The reason why the newCFrame is the same is because you never changed the value of 'newCFrame'. You only changed the value of 'part.CFrame'
So what you wanna do is :
print(newCFrame)
part.CFrame = part.CFrame * newCFrame
print(part.CFrame)
If I'm correct.
Radiants would be if you measure the length of a circle with a radius of one (so 90 degrees would be 0.5pi) for a little clarification (i hope)
10:05
1(pi) Radians = 180 degrees
For example: 2(pi) Radians * _180 degrees_ = 360 degrees
(pi) Radians
Who feels like this is very useful but if you made a script on anything you'd have no idea to do without the vids
You could use the formula for degrees conversion as rad multiplied by 180/ pi value ( 3.14 or 22/7 )
Captions said Deaf King, pretty cool
His now our math + coding teacher
so basically, a CFrame is a mix of the position and the orientation of an object
This video is helping me write a custom camera script...
You deserve way more credit for going into detail like that!
Now I can finish my core startup.
Whenever I use math.random on my part it works but the orientation is all wrong. I'll put it at CFrame.Angles(math.rad(90), math.rad(45), (0)) and then it comes out as 45, 90, 90. Can anyone help me? i've been stuck on this problem for too long
Thx for this tutorial u make it very easy to under stand Love u!
"Looks kinda dumb" LOL 14:41 Good tutorial though!
thank you just needed to look over this didn't remember cframe
It was verry easy to understand wasn t confusing al all
thanks for making it simple! keep it up my man B)
Hey I have a question, at 13:19 why would one say * if we want to add the angle to the previous angle, in other words why is * adding the angle
If Vector3 and CFrame are the same then why not use Vector3 instead of CFrame? Vector3 is a lot easier.
Its cuz u can change rhe orientation with crframe (nvm i guess this comment was useless, cuz im pretty sure by now your a professional scripter)
@@daconday Vector3 also can do the orientation thingy?
@@umka9189 idk now i quitted roblox scripting because i don't like roblox engine much its limited, i went to unity coding which uses C# but I still have experience with lua a bit. What I remember is you can't change orientation with vector3, only CFrame can. Though I highly advise you to look it up.
Useful Tutorial! I need this one so I can make a working door :)