Advanced Roblox Scripting Tutorial #7 - CFrame (Beginner to Pro 2019)

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 2024

ความคิดเห็น • 639

  • @TheDevKing
    @TheDevKing  4 ปีที่แล้ว +93

    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

    • @anthony4564
      @anthony4564 4 ปีที่แล้ว +1

      btw, it's not 10 or 11, it's 12

    • @anthony4564
      @anthony4564 4 ปีที่แล้ว

      TheDevKing Also, PLEASE PLEASE PLEASE DO A TUTORIAL ON THE WEIRD, TOO COMPLICATED, MATRIX PART OF CFRAME.

    • @michaeldavis6993
      @michaeldavis6993 4 ปีที่แล้ว

      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

    • @michaeldavis6993
      @michaeldavis6993 4 ปีที่แล้ว

      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

    • @saidabdiche5890
      @saidabdiche5890 4 ปีที่แล้ว

      i was trying to hack now i am creating an obby

  • @peerapatlerdlatthaporn1567
    @peerapatlerdlatthaporn1567 4 ปีที่แล้ว +427

    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!

    • @levisip1874
      @levisip1874 3 ปีที่แล้ว +3

      Lel

    • @lunyxappocalypse7071
      @lunyxappocalypse7071 3 ปีที่แล้ว +5

      I am more frustrated then anything.

    • @MemeDealer-ls6pf
      @MemeDealer-ls6pf 2 ปีที่แล้ว +3

      Such a coincidence I was learning quantum physics before reading the comment.

    • @peerapatlerdlatthaporn1567
      @peerapatlerdlatthaporn1567 2 ปีที่แล้ว

      @@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.

    • @developernick5535
      @developernick5535 2 ปีที่แล้ว +1

      @@lunyxappocalypse7071 SAME I AM SO CONFUSED IMMA SKIP AND COME TO THIS LATER ON!

  • @consquence9313
    @consquence9313 3 ปีที่แล้ว +153

    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.

    • @tydite5808
      @tydite5808 3 ปีที่แล้ว +4

      the fact that this person is still helping people is really nice, this helped me out :)

    • @nightvolk6853
      @nightvolk6853 2 ปีที่แล้ว

      yup, it works

    • @MemeDealer-ls6pf
      @MemeDealer-ls6pf 2 ปีที่แล้ว

      Still helpful, I do wonder what the other values are

    • @Azure546
      @Azure546 2 ปีที่แล้ว

      There is and thats me :)

    • @piicoooooo
      @piicoooooo 2 ปีที่แล้ว

      thanks a lot :)

  • @khy8
    @khy8 4 ปีที่แล้ว +301

    Wasn't confusing at all pretty easy to understand tbh

    • @TheDevKing
      @TheDevKing  4 ปีที่แล้ว +73

      that's great man! Keep it up, you can probably learn scripting better than most people if you thought this was easy lol

    • @jackenplayz2478
      @jackenplayz2478 4 ปีที่แล้ว +3

      same

    • @KaosxWrld
      @KaosxWrld 4 ปีที่แล้ว +2

      Hey Khy!

    • @pora6538
      @pora6538 4 ปีที่แล้ว +2

      Same xd

    • @yuinurahilyon5711
      @yuinurahilyon5711 4 ปีที่แล้ว +3

      Its very basic and simple...

  • @darkmetro8882
    @darkmetro8882 3 ปีที่แล้ว +310

    "theres 10 values"
    "oh wait theres 11"
    "im soryy guys theres 10 haha"
    My guy there's 12

    • @chrismelon8192
      @chrismelon8192 3 ปีที่แล้ว +6

      Theres 13

    • @akshitagoel6762
      @akshitagoel6762 3 ปีที่แล้ว +17

      @@chrismelon8192 no theres 12 lol

    • @frannncoco
      @frannncoco 3 ปีที่แล้ว +4

      @@akshitagoel6762 No, there’s 9

    • @akshitagoel6762
      @akshitagoel6762 3 ปีที่แล้ว +14

      @@frannncoco -31.5 5 -20 1 0 0 0 1 0 0 0 1
      thats 12 numbers

    • @robloxegy2565
      @robloxegy2565 3 ปีที่แล้ว +12

      Y’all idiots peanut sized brains

  • @randomperson9997
    @randomperson9997 3 ปีที่แล้ว +47

    "don't be scared"
    "im confused"
    "you just have to put it there idk"
    *internal scared screeching*

  • @alongal407
    @alongal407 3 ปีที่แล้ว +32

    "Cframe is better to use because you use it more often" -The Dev King

  • @imper3310
    @imper3310 2 ปีที่แล้ว +17

    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.

    • @pchanio
      @pchanio 2 ปีที่แล้ว

      radians are the arced length of a unit circle whereas degrees are used to measure angles

    • @RubyYTer
      @RubyYTer 2 ปีที่แล้ว

      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....

    • @justdoit6141
      @justdoit6141 ปีที่แล้ว +2

      @@RubyYTer radians express degrees in terms of pi. 2 pi describes a whole revolution around the unit circle

    • @dr_mafarioyt4313
      @dr_mafarioyt4313 ปีที่แล้ว

      Fun fact: Radians ≈ Degrees / 57

    • @jso1
      @jso1 6 หลายเดือนก่อน

      ​@@RubyYTer 2 units of measure can have the same value. its just that inches and feet dont

  • @Gen1us707
    @Gen1us707 ปีที่แล้ว +4

    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

  • @littlebabypuffer
    @littlebabypuffer 4 ปีที่แล้ว +31

    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

    • @yourmother5706
      @yourmother5706 2 ปีที่แล้ว

      update on scripting journey?

    • @littlebabypuffer
      @littlebabypuffer 2 ปีที่แล้ว

      @@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

    • @yourmother5706
      @yourmother5706 2 ปีที่แล้ว

      @@DiRt51784 sure how u doing

    • @yourmother5706
      @yourmother5706 2 ปีที่แล้ว

      @@DiRt51784 I’m trying to gather a team of beginner scripters or builders

    • @yourmother5706
      @yourmother5706 2 ปีที่แล้ว

      @@DiRt51784 I want everyone to help each other

  • @khmocha
    @khmocha 4 ปีที่แล้ว +27

    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.

    • @bullshitdepartment
      @bullshitdepartment 3 ปีที่แล้ว +8

      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

    • @guilhermechaves8372
      @guilhermechaves8372 ปีที่แล้ว

      a radian is the angle formed when you get an arc of a circle that is the same length as the radius.

    • @ayo123
      @ayo123 ปีที่แล้ว +1

      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

    • @ayo123
      @ayo123 ปีที่แล้ว +1

      I mean pi not ok

    • @user-xz9oo8di2s
      @user-xz9oo8di2s 2 หลายเดือนก่อน

      my brain cant comprehend wut yall r saying

  • @theartkid7226
    @theartkid7226 5 ปีที่แล้ว +18

    Hello!
    I am very excited to learn with you!
    Finally found someone who posts more regularly, Thank you!

  • @kraai1152
    @kraai1152 4 ปีที่แล้ว +12

    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.

    • @seamusforever7081
      @seamusforever7081 4 ปีที่แล้ว +1

      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.

    • @olikjam1372
      @olikjam1372 2 ปีที่แล้ว

      Same, with me trying to learn lua. I get demotivated just like you but still wanna continue.

    • @notananimegirl
      @notananimegirl 2 ปีที่แล้ว

      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!

    • @kraai1152
      @kraai1152 2 ปีที่แล้ว

      @@notananimegirl lmao i gave up

    • @notananimegirl
      @notananimegirl 2 ปีที่แล้ว

      @@kraai1152 you gotta try again. Do it for me (◕︿◕)

  • @anrovlogs2834
    @anrovlogs2834 5 ปีที่แล้ว +60

    before :: what is CFrame its a position??
    after watching this video :: Okey i know now what is cframe XD

    • @anrovlogs2834
      @anrovlogs2834 5 ปีที่แล้ว +4

      im so happy bcuz i learned scripting from you

    • @realprisec
      @realprisec 4 ปีที่แล้ว +22

      I think no one fucking cares

    • @liamstudios1390
      @liamstudios1390 4 ปีที่แล้ว

      @@realprisec lmao

    • @realprisec
      @realprisec 4 ปีที่แล้ว +17

      @@liamstudios1390 I don't know why I was this rude.

    • @liamstudios1390
      @liamstudios1390 4 ปีที่แล้ว

      @@realprisec xD

  • @xboydubose7254
    @xboydubose7254 5 ปีที่แล้ว +50

    Why does CFrame use multiplication to offset, and Vectors use addition?

    • @TheDevKing
      @TheDevKing  5 ปีที่แล้ว +24

      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

    • @chipanyanwu
      @chipanyanwu 5 ปีที่แล้ว +19

      It's because CFrames are something called Matrices which you can't add together.

    • @Positivityy10
      @Positivityy10 4 ปีที่แล้ว

      BearByte2 Can you explain to me what a matrices is?

    • @bingusiswatching6335
      @bingusiswatching6335 4 ปีที่แล้ว +4

      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...

    • @Positivityy10
      @Positivityy10 4 ปีที่แล้ว

      Dave's Codes Oh alright. Thanks

  • @hikaii2349
    @hikaii2349 5 ปีที่แล้ว +9

    Why 👏🏻 are 👏🏻 you 👏🏻 so 👏🏻 under- 👏🏻 rated???

    • @conradpierce8994
      @conradpierce8994 5 ปีที่แล้ว +1

      because he stopped uploading for months so I assume most of his viewers just left.

    • @TheDevKing
      @TheDevKing  4 ปีที่แล้ว

      That's what I'm wondering lol

    • @TheDevKing
      @TheDevKing  4 ปีที่แล้ว +1

      @@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! :)

  • @Simvoid230
    @Simvoid230 4 ปีที่แล้ว +4

    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

  • @vitoawesome
    @vitoawesome 5 ปีที่แล้ว +30

    Tutorial on metatables

  • @itsnotloveitslust
    @itsnotloveitslust 5 ปีที่แล้ว +1

    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.

    • @TheDevKing
      @TheDevKing  4 ปีที่แล้ว +4

      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.

    • @TapWaterRBLX
      @TapWaterRBLX 4 ปีที่แล้ว +3

      TypicalHB hey just saw this lol this is the channel

    • @rubina9271
      @rubina9271 4 ปีที่แล้ว

      @@TapWaterRBLX Thanks for the videos Tap, can ya do raycasting next? I am keen on learning that and your tutorials are really well explained!

  • @ipoststuff.2564
    @ipoststuff.2564 4 ปีที่แล้ว +18

    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

    • @hoangkakamigahara
      @hoangkakamigahara 4 ปีที่แล้ว

      OHHHHHHHHHHHHHHHHH

    • @emil1634
      @emil1634 3 ปีที่แล้ว +7

      No it Alt F4

    • @hc6929
      @hc6929 3 ปีที่แล้ว +1

      i love you i could've gone my entire life without knowing that

    • @bullshitdepartment
      @bullshitdepartment 3 ปีที่แล้ว

      Thx

    • @ikeahedgehog
      @ikeahedgehog 3 ปีที่แล้ว +1

      @@emil1634 haha troll go BRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

  • @sandpaperunderthetable6708
    @sandpaperunderthetable6708 3 ปีที่แล้ว +2

    I was confused by other youtuber but i finally understood when you explained

  • @wiktorm3838
    @wiktorm3838 4 ปีที่แล้ว +6

    Thank you so much. I m making a game like a crossy road and now i know how to change my camera orientation.

    • @aligamiles
      @aligamiles 4 ปีที่แล้ว

      What's your game going to be called?

    • @wiktorm3838
      @wiktorm3838 4 ปีที่แล้ว

      @@aligamiles idk what s It going to be called but somthing like Mario

    • @David12754
      @David12754 4 ปีที่แล้ว

      Wiktor Musiał Be careful with calling it Mario Roblox may take it down because of the Nintendo copyrights.

    • @wiktorm3838
      @wiktorm3838 4 ปีที่แล้ว

      @@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 :)

    • @designd9956
      @designd9956 4 ปีที่แล้ว

      what the holy freak you can do that. okay im gonna start watching the video

  • @backkslashhh
    @backkslashhh 3 ปีที่แล้ว +1

    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

  • @oreki1476
    @oreki1476 4 หลายเดือนก่อน +3

    I might be late to learn this but good video Man im Learning a lot from it!

    • @user-qv4ht5ri3g
      @user-qv4ht5ri3g 3 หลายเดือนก่อน

      Same bruh

    • @baconmasterr
      @baconmasterr หลายเดือนก่อน

      never too late to learn how to script, hope you watched the beginner series tho lol XD

  • @user-fd4sk8ev4d
    @user-fd4sk8ev4d 11 หลายเดือนก่อน +1

    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.

  • @symbiote626
    @symbiote626 2 หลายเดือนก่อน +1

    We got this brothers! Finished beginner series and only 18 videos remaining

  • @TheLexingtonTimes
    @TheLexingtonTimes 2 ปีที่แล้ว +2

    Roblox scripting is the one time my trigonometry and physics classes ever came in handy.

  • @tenorHarlequin
    @tenorHarlequin 4 ปีที่แล้ว +17

    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.

    • @witchy4486
      @witchy4486 ปีที่แล้ว +1

      thank u for posting this

  • @IndeedMax
    @IndeedMax ปีที่แล้ว +2

    Bro explains things so good, thanks man.

  • @olikjam1372
    @olikjam1372 2 ปีที่แล้ว +1

    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

  • @THEKING-xk6vs
    @THEKING-xk6vs 4 ปีที่แล้ว +22

    The values didn’t change because you are printing the same variable.

    • @tusheyy6033
      @tusheyy6033 4 ปีที่แล้ว

      exactly

    • @rocko4494
      @rocko4494 4 ปีที่แล้ว

      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.

    • @THEKING-xk6vs
      @THEKING-xk6vs 4 ปีที่แล้ว

      Rocko 1004 ??? He was printing the exact same variable that he defined before.

    • @darren6329
      @darren6329 4 ปีที่แล้ว

      THE KING he printed before he multiplied it with the angle and then after the multiplied it

    • @THEKING-xk6vs
      @THEKING-xk6vs 4 ปีที่แล้ว

      Darren I know. He printed the same variable that never had its value changed.

  • @xead2181
    @xead2181 5 ปีที่แล้ว +1

    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!

  • @thediamondpro4486
    @thediamondpro4486 3 ปีที่แล้ว +1

    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

  • @michaelswahla4927
    @michaelswahla4927 ปีที่แล้ว +3

    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)

  • @acemo1
    @acemo1 5 ปีที่แล้ว +7

    Nice was just gonna search for a cframe tutorial

  • @cracktus1392
    @cracktus1392 3 ปีที่แล้ว +4

    you make mistakes so confindently, thats why i love this channel

  • @scriptedgraphics4915
    @scriptedgraphics4915 4 ปีที่แล้ว +6

    When Tapwater doesnt understand somthing, he says. Dont worry about that he he...

  • @cyrb_dob
    @cyrb_dob 3 ปีที่แล้ว +1

    I think that CFrame and TweenService is a great mix

  • @unknownedleaf
    @unknownedleaf 7 หลายเดือนก่อน +2

    180 degrees = pi rad

  • @j1ck425
    @j1ck425 4 ปีที่แล้ว +2

    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.

  • @botnumb39
    @botnumb39 2 ปีที่แล้ว +1

    The dev king is definitely the funniest dev

  • @Cashier191
    @Cashier191 2 ปีที่แล้ว +1

    Your the best! Thanks for all the scripting tutorials so far!

  • @ahamedsalim7609
    @ahamedsalim7609 3 ปีที่แล้ว +1

    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

  • @infernozxy3360
    @infernozxy3360 5 ปีที่แล้ว +2

    I was waiting for this :D

  • @chilliesart6057
    @chilliesart6057 3 ปีที่แล้ว +7

    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.

    • @Azure546
      @Azure546 2 ปีที่แล้ว

      that helped me im actually taking notes rn ngl lol

  • @ZZZ_Jaydee
    @ZZZ_Jaydee 3 ปีที่แล้ว +2

    I am confused! But I will rewatch the video on my computer because on my computer I just tend to concentrate more!

  • @Hello-ue9tj
    @Hello-ue9tj 2 ปีที่แล้ว +2

    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

  • @TheSxrged
    @TheSxrged 4 ปีที่แล้ว +1

    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 😀

  • @matthewyazziee2343
    @matthewyazziee2343 2 ปีที่แล้ว +1

    This was a good video thank you! I am trying to gain a better understanding in learning CFrame!

  • @RetiredCh
    @RetiredCh 4 ปีที่แล้ว +1

    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

  • @over4863
    @over4863 4 ปีที่แล้ว +5

    *confusing Spanish noices*

  • @marynassuna3792
    @marynassuna3792 3 ปีที่แล้ว +1

    I'm bout to learn a new civilization of coding after this guy finishes his series

  • @Star-hi1dv
    @Star-hi1dv 4 ปีที่แล้ว

    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

  • @oisinpark5807
    @oisinpark5807 ปีที่แล้ว +1

    In mathematics radians are used to measure angles

  • @thhtmqtv515
    @thhtmqtv515 32 นาทีที่ผ่านมา

    i think should use CFrame when you want to change rotation but you should use Vector3 when change position

  • @brincadeirasdogu9750
    @brincadeirasdogu9750 2 ปีที่แล้ว +1

    4:19 the rotation thing looked like a heart

  • @lil_magic_lil1758
    @lil_magic_lil1758 2 ปีที่แล้ว

    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.

  • @Clownzyy
    @Clownzyy 3 ปีที่แล้ว

    "If you want the degrees to be in your here"
    Nice Job

  • @MysticAalin
    @MysticAalin 3 ปีที่แล้ว

    Thank you so much.. Your user input service tutorial was the best it made me learn ALOT

  • @vrltx7863
    @vrltx7863 3 ปีที่แล้ว +2

    Thank god I have learned about radicals multiple years before this video, or I wouldn't have understood "math.rad(45)" very well XD.

  • @osboro6135
    @osboro6135 4 ปีที่แล้ว +1

    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)
    :)

  • @quintavius4865
    @quintavius4865 3 ปีที่แล้ว

    radians are basically another way to represent angles, accept using pi. 45 degrees is the same as pi/4 radians.

  • @scriptx1682
    @scriptx1682 4 ปีที่แล้ว +24

    3:50 there is 12

  • @hailedduke3402
    @hailedduke3402 9 หลายเดือนก่อน

    Fun tip for everyone, πRad=180°, (1/2)πRad=90° and (2)πRad=360°

  • @elpapaito9141
    @elpapaito9141 2 ปีที่แล้ว

    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. 😂

  • @ProperMonke-ty6xe
    @ProperMonke-ty6xe 22 วันที่ผ่านมา

    1 radian/rad = 57.3 degrees approximately 360/ 2 pi which equals 360/6.28

  • @demisemihemidemisemidescizxciv
    @demisemihemidemisemidescizxciv ปีที่แล้ว

    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

  • @bluestone824
    @bluestone824 3 ปีที่แล้ว +1

    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.

  • @keplaris2401
    @keplaris2401 ปีที่แล้ว

    14:19, no it won't change since you are printing the same variable.

  • @lightermcqueet3977
    @lightermcqueet3977 4 ปีที่แล้ว

    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.

  • @critgamer3590
    @critgamer3590 ปีที่แล้ว

    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

  • @Vato_Hey
    @Vato_Hey 8 หลายเดือนก่อน

    Idk how but i always undarstand whatever you teach me

  • @dregwu8904
    @dregwu8904 4 ปีที่แล้ว +1

    Thanks for the tutorial it helped me with cframes

  • @declan_youtube
    @declan_youtube 3 ปีที่แล้ว

    It sounds like he's saying 'It is the dev king year'. Can't disagree.

  • @anxiouspole
    @anxiouspole ปีที่แล้ว +1

    i think cframe is important when it comes to part events

  • @Dollarrm
    @Dollarrm หลายเดือนก่อน

    Thank you devking, i can now animate ACS!

  • @khamolbhumithonglim3791
    @khamolbhumithonglim3791 3 ปีที่แล้ว +1

    with the help of this. i've proceed to spin blocks around using repeat loops

  • @sykozis
    @sykozis 3 ปีที่แล้ว +1

    Me: Using black theme in roblox studio
    Also me: Watches this vid
    Also my eyes: Flashbang

    • @sykozis
      @sykozis 3 ปีที่แล้ว

      @kelp in rn outside ;-;

  • @hasisys8429
    @hasisys8429 3 ปีที่แล้ว

    CFrame is a cosplay of Vector3 but this cosplay have more abilities than the Vector3 such as change orientation of a part

  • @EndHomunculus
    @EndHomunculus ปีที่แล้ว

    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

  • @zindycangaming9851
    @zindycangaming9851 ปีที่แล้ว

    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.

  • @Mayohills
    @Mayohills 3 ปีที่แล้ว

    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)

  • @Jackyliu009
    @Jackyliu009 4 ปีที่แล้ว

    10:05
    1(pi) Radians = 180 degrees
    For example: 2(pi) Radians * _180 degrees_ = 360 degrees
    (pi) Radians

  • @jamesjohn5169
    @jamesjohn5169 ปีที่แล้ว

    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

  • @xerto_YT
    @xerto_YT ปีที่แล้ว

    You could use the formula for degrees conversion as rad multiplied by 180/ pi value ( 3.14 or 22/7 )

  • @betrayedpickle291
    @betrayedpickle291 3 ปีที่แล้ว

    Captions said Deaf King, pretty cool

  • @cactus6526
    @cactus6526 2 ปีที่แล้ว +1

    His now our math + coding teacher

  • @Ooga_OnYT
    @Ooga_OnYT หลายเดือนก่อน

    so basically, a CFrame is a mix of the position and the orientation of an object

  • @JellybeanSTUDIOS
    @JellybeanSTUDIOS 3 ปีที่แล้ว

    This video is helping me write a custom camera script...

  • @HeVersatile
    @HeVersatile 3 ปีที่แล้ว +1

    You deserve way more credit for going into detail like that!

  • @freee8581
    @freee8581 4 ปีที่แล้ว +2

    Now I can finish my core startup.

  • @Shapelybox
    @Shapelybox 3 ปีที่แล้ว +1

    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

  • @Dxrkmania
    @Dxrkmania 3 ปีที่แล้ว

    Thx for this tutorial u make it very easy to under stand Love u!

  • @sqmetimesdev6150
    @sqmetimesdev6150 5 ปีที่แล้ว +8

    "Looks kinda dumb" LOL 14:41 Good tutorial though!

  • @nilegef4590
    @nilegef4590 4 ปีที่แล้ว

    thank you just needed to look over this didn't remember cframe

  • @indigoo8013
    @indigoo8013 3 ปีที่แล้ว

    It was verry easy to understand wasn t confusing al all

  • @FeedMyBalls
    @FeedMyBalls 2 ปีที่แล้ว

    thanks for making it simple! keep it up my man B)

  • @RoboticUzi1x
    @RoboticUzi1x 10 หลายเดือนก่อน +1

    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

  • @mildgamespro5519
    @mildgamespro5519 3 ปีที่แล้ว +2

    If Vector3 and CFrame are the same then why not use Vector3 instead of CFrame? Vector3 is a lot easier.

    • @daconday
      @daconday 3 ปีที่แล้ว

      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)

    • @umka9189
      @umka9189 2 ปีที่แล้ว

      @@daconday Vector3 also can do the orientation thingy?

    • @daconday
      @daconday 2 ปีที่แล้ว

      @@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.

  • @pelot987
    @pelot987 ปีที่แล้ว

    Useful Tutorial! I need this one so I can make a working door :)