Lerping - How To Move Parts Without TweenService

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 174

  • @velocitygamer-wvu
    @velocitygamer-wvu 6 месяцев назад +5

    i did not understand what the hell lerp was until i watched your video, GREAT TUTORIAL, 10/10
    absolutely makes sense now

  • @Badubiy
    @Badubiy 2 года назад +17

    Why only 452 views? You deserve millions! Your videos are so useful and important

    • @GnomeCode
      @GnomeCode  2 года назад +5

      Thanks for the support

    • @horrorgamedev
      @horrorgamedev 9 месяцев назад

      @@GnomeCode i may be hyper late to this video, but how could i make a part lerp or tween to another part. im trying to make a script that pulls the player towards a part

    • @costo.
      @costo. 4 месяца назад

      @@horrorgamedev targetCFrame = part2.CFrame

    • @watarod
      @watarod 4 месяца назад

      @@horrorgamedev humanoid root part

    • @Kitoucher
      @Kitoucher 3 месяца назад

      Change the part to humanoid root part

  • @CrabGuyy
    @CrabGuyy Год назад +17

    This is the most well explained and complete lerp video. This is a great resource

  • @Josh-op6dl
    @Josh-op6dl Месяц назад

    Blessed be the power of Lerping in all engines

  • @mr_griffolukegriffiths9166
    @mr_griffolukegriffiths9166 2 года назад +28

    Superb video! Really thorough and without overcomplicating it. Bravo you awesome Gnome 👌

  • @MarxismOfficial
    @MarxismOfficial 2 года назад +2

    DUDE, I'VE BEEN WANTING TO MAKE THIS FOR SO LONG. THANK YOU VERY MUCH!

  • @lossycompressed
    @lossycompressed Год назад +3

    very useful, been porting a game to an older client without tweenservice so this will be very helpful!

  • @NukegamerboyRA
    @NukegamerboyRA 2 года назад +10

    This is what I needed for my game thank you!

    • @epixerty
      @epixerty 2 года назад +1

      no you didn't

    • @NukegamerboyRA
      @NukegamerboyRA 2 года назад +1

      @@epixerty yes I do I'm making a game with a group of people and I'm the scripter. So stop assuming what people need and don't

    • @epixerty
      @epixerty 2 года назад +1

      @@NukegamerboyRA You're the type of guy to comment the same thing on every video, just because you feel like commenting something. Lerp isn't even that advanced, and if you are a "scripter" you would at least know about TweenService which is almost the same thing

    • @qwerty_qwerty
      @qwerty_qwerty 2 года назад +4

      @@epixerty did you even watch the video? The reason Gnome is showing us this is because using TweenService you can't change the target while the Tween is running. And it doesn't matter that it's not advanced, no one said it was.

    • @epixerty
      @epixerty 2 года назад

      @@qwerty_qwerty I know that, but that's for very specific situations which this guy clearly hasn't even encountered yet

  • @uliveulearnandregret
    @uliveulearnandregret Год назад

    ngl this is more helpful compared to most of the tutorials out there, they don't really explain what tween is in a good way, I'm hoping the raycast video can get to me too :)

  • @TheAmazingRobloxDev
    @TheAmazingRobloxDev Год назад

    I watch your videos almost every day sins 5 months ago and i love all the work you put for all you viewers

  • @itzkxhu
    @itzkxhu Год назад

    i really like to use the math formula
    ```
    {end} - x position where you want to move the part to
    ( X * 2 + {end} ) / 3
    ```
    ,where it will execute the code, until the part is on it's destination

    • @Fujui
      @Fujui Год назад

      Can you elaborate please?

  • @Im_crybilon
    @Im_crybilon Год назад

    This has been the traditional code for coding since I started back in 2014; I think I should get back developing-kinda nostalgic

  • @glenrose300
    @glenrose300 2 года назад +74

    0 Views, 0 Comments And 0 Likes. Don't Know How I Got A Notification Early When My WiFi Is Terrible.

    • @epixerty
      @epixerty 2 года назад +5

      doesn't have anything to do with your wifi its youtube

    • @Shiba6442
      @Shiba6442 2 года назад +3

      @@epixerty if you have bad WiFi your youtube will be terribble

    • @groboggan9535
      @groboggan9535 2 года назад +3

      It’s because you are the chosen one my lord “bows down respectfully and does a little jig”🥔

    • @epixerty
      @epixerty 2 года назад +2

      @@Shiba6442 a bad wifi is just going to delay the notification less than 2 seconds, doesn't change the fact that you would be very early

    • @CuteBricks
      @CuteBricks Год назад

      Maybe the 0 was for the wifi

  • @hike8932
    @hike8932 Год назад +1

    this is like super advanced and i think tweening is more efficient
    so ima leave it here and head to the next tutorial
    or if you want to learn maybe learn cframes a little bit more and the runservice too

    • @hike8932
      @hike8932 8 месяцев назад +2

      Look at you, your so epic, because im now here to learn how to incorporate lerping, bezier curves and some maths stuff into coding. Good job, me. Keep going.

  • @candykid44
    @candykid44 2 года назад +5

    Very interesting tutorial idea! Keep up the good work gnome! :)

  • @the1andonlyprehistoricpineappl
    @the1andonlyprehistoricpineappl 2 года назад +1

    Idea for series:
    How to make a game like
    “Natural Disaster Survival”

  • @cryytics2730
    @cryytics2730 Год назад

    Thank you, I am learning how to script right now and this taught me alot.

  • @GreatRamilYT
    @GreatRamilYT 2 года назад

    wow, thx GnomeCode for new video! keep up the good work creating amazing content!

  • @Cashier_A
    @Cashier_A Год назад

    tbh gnome code = W ive been following him since his first learn how to code video I think it was

  • @koainanis5840
    @koainanis5840 2 года назад

    That's a pretty interesting little nice helper !
    The GnomeCode made it =)

  • @Miro_Ski
    @Miro_Ski 2 года назад +3

    Great useful tutorial! , but what i'l appreciate more is that you make a tutorial on camera manipulation.
    such as if you click a part the camera goes to the part.

    • @GnomeCode
      @GnomeCode  2 года назад +1

      I may do a standalone video on that soon. In the meantime, you may find this helpful: ruclips.net/video/UJEr-gCUJ5k/видео.html

  • @deathhancox
    @deathhancox Месяц назад

    Could we get a video about smoothly moving a part from one position to a second position that's in motion? (Such as a boomerang returning to the players hand.)

  • @MontiBloxxer
    @MontiBloxxer 2 года назад +1

    Yo I was looking for a tutorial on this. Thanks!

  • @animatnetic2545
    @animatnetic2545 Год назад +3

    Hey ugh, I probs wont get a reply, but when you defined "startTime", you actually never used it???

  • @sebalby34
    @sebalby34 2 года назад +2

    cool video! whe next doors tutorial tho?

  • @EndeXlol
    @EndeXlol 2 года назад +2

    Great video, exactly what i needed 👍

  • @universed493
    @universed493 Год назад +1

    Amazing video! Roblox documentation really doesn’t have a lot on this subject. I’m currently making inverse kinematics feet in r6, I’ve finished mostly everything, but I just needed a way to get the feet to lerp smoothly to the target within the renderstep.

    • @oofoof69
      @oofoof69 8 месяцев назад

      Do you plan pn making that a plugin?

  • @ImVerySorry
    @ImVerySorry Год назад

    Remember: you can select something and then press ''CTRL + X'' to delete + copy it. So if you press ''CTRL + V'' it will be pasted. c:

  • @cocostars_37
    @cocostars_37 2 года назад

    As always, perfect !

  • @TheHeadlessMario
    @TheHeadlessMario 2 года назад

    Good video, i learned lerping from your rush AI video, Thanks :) btw just one question, when does doors part 8 come out?

    • @Shadow_06735
      @Shadow_06735 2 года назад

      thats what im questioning as well!

  • @tist203
    @tist203 Год назад

    Excellent video and demo

  • @beanoslol
    @beanoslol 2 года назад

    I also learned how to make a map system with this

  • @bloxthebloxxer8234
    @bloxthebloxxer8234 3 месяца назад

    what was the point of the "startTime" variable?

  • @GamingStudiosX
    @GamingStudiosX 2 года назад +1

    why are your newer videos like darker than the videos you made a few days ago ??

  • @Darky_Gamer
    @Darky_Gamer 2 года назад

    Gnomecode will you work more on doors I LOVE THAT!

  • @FEG_Studio
    @FEG_Studio Год назад

    Underrated !

  • @jackoboy7766
    @jackoboy7766 2 года назад +2

    I'm confused on why the alpha value is runningTime divided by lerpTime. Could someone explain it?

    • @BasedOnBrian
      @BasedOnBrian 2 года назад

      Getting its speed

    • @BasedOnBrian
      @BasedOnBrian 2 года назад

      and move in constant

    • @jackoboy7766
      @jackoboy7766 2 года назад

      @@BasedOnBrian yeah but he said that the runningTime was 1.5 and I don't understand where that came from, because the value in the variable was 0.

    • @BasedOnBrian
      @BasedOnBrian 2 года назад

      @@jackoboy7766 Heartbeat detects ur frame wdym

    • @pepperdayjackpac4521
      @pepperdayjackpac4521 Год назад

      Bc needs to get the percentage. .5 = 50% for example; it has to be a value between 0 and 1, and you do that by dividing by the maximum amount.

  • @Noon1263
    @Noon1263 Год назад +1

    is there a way i could use this to rotate a model colockwise constantly in the run service loop, while ocislating it up and down slightly, in other words, can i lerp 2 or more properties at once?

  • @LeCanardYT
    @LeCanardYT Год назад

    Thanks you for the help, you need more likes !

  • @SunkenOcean
    @SunkenOcean Год назад +1

    could you break down/explain what the for *for i =* means?

    • @SomeNinety
      @SomeNinety 20 часов назад

      for however many times i fits in n do (third param just means how much i increases every loop (default 1))

  • @soma78
    @soma78 Месяц назад

    so what's the advantage of using Lerp over TweenService ?

  • @alejandrorivera9694
    @alejandrorivera9694 2 года назад +2

    Very nice tutorial! I really needed to learn that but... How do I make the Animate2 Script compatible with other animation scripts?Help me to fix that please! (I already subscribed and liked)

  • @정준희-e1w
    @정준희-e1w 2 года назад +1

    Bro Gnome are you seeing my project or something cause i needed a way to move my models

  • @Batimox
    @Batimox 2 года назад

    Nice video, however I have a question, will you still continue with the doors tutorial?

  • @djcrutzfighter_rbx
    @djcrutzfighter_rbx 2 года назад

    Hiiiiio 28 mins early best content

  • @obliviouslydan
    @obliviouslydan Год назад

    soo once alpha equaled more than 1, how do i make it so that it moves smoothly again after making part.CFrame equal to startCFrame

  • @iloveapplejuice5947
    @iloveapplejuice5947 2 года назад

    When is the best gnome jam?

  • @qester5
    @qester5 2 года назад

    gnomecode when will you make another doors tutorial?

  • @beanoslol
    @beanoslol 2 года назад

    What about if I use PivotTo() instead of Lerp()

  • @stroyosh4670
    @stroyosh4670 Год назад

    I've learned a lot 😃

  • @rockyes3239
    @rockyes3239 10 месяцев назад

    lerp cant be used on strings?

  • @Despacite
    @Despacite 2 года назад

    Nice Video!

  • @DeveloperPop
    @DeveloperPop 2 года назад

    I have a damage code with a part that will lerp to a location. If the part is deleted why is the damage code still working when the Lerp is complete ((the damage script works when the lerp is complete so its inside the lerp script))

  • @SuperGamer-kr1dn
    @SuperGamer-kr1dn 2 года назад

    n the tower defence series that GnomeCode created, i have a problem in it. When i load my game, the lobby's data is working and loading, but when i play the game the data in the game is not connecting with the data in the lobby. Please can someone help me with this, i am so frusterated and have been trying this for sooooo many hours

  • @randomhasfwens
    @randomhasfwens 2 года назад +2

    When is part 8 of doors?

    • @GnomeCode
      @GnomeCode  2 месяца назад

      1 year later - It's finally here!

    • @randomhasfwens
      @randomhasfwens 2 месяца назад

      @@GnomeCode LESS GOOOOOO

    • @randomhasfwens
      @randomhasfwens 2 месяца назад +1

      @@GnomeCode but I already started making my own.. but I only know how to make one bc of u Tysm :D

  • @RobloxPuppet
    @RobloxPuppet 2 года назад +1

    When teddy Chapter 5 come out

  • @real_logangifty07
    @real_logangifty07 2 года назад

    Hey can you do part 8 of doors because part 1 of doors, I tried but don't work people kept saying it, maybe you know how to fix the bugs for room generated, entity and etc.

  • @andyengine2661
    @andyengine2661 2 года назад

    would love it if you could do a tutorial for first person weapons .. from scratch ... including arms and reloading etc, etc... their doesn't seem to be a definitive tutorial on the subject that doesn't use pre-made code etc.

    • @casyyalo3
      @casyyalo3 2 года назад +2

      Your gonna need to learn a TON of scripting and techniques before you get to advanced stuff such as FPS weapons as they could be coded in many different ways

    • @andyengine2661
      @andyengine2661 2 года назад

      @@casyyalo3 I already know quite a lot of scripting basics for Roblox ... The idea of a tutorial is to teach ... A reloading weapon tutorial would be great for learning new scripting techniques. My area isn't really scripting/coding but in 3D asset creation. My scripting knowledge mainly comes from using Unreal Engine 2 and Unreal Script.

  • @decayingpink
    @decayingpink 2 месяца назад

    the disconnect part didnt work for me idk why

  • @jimsmowingofficial
    @jimsmowingofficial Год назад

    You should add a math.clamp to the alpha, otherwise it could go over what it should

  • @bardiumtrove
    @bardiumtrove 2 года назад

    thanks it helped!

  • @kennethkline7702
    @kennethkline7702 Год назад

    Please turn this into a camera sequence

  • @walsterburns450
    @walsterburns450 Год назад

    Damn nice vid

  • @abnormal_gamer3
    @abnormal_gamer3 2 года назад

    mr gnome code i cant even use roblox studio and try to make a tds Game! how do i fix this problem?

  • @thechannel7988
    @thechannel7988 2 года назад

    can you create a monster that randomly attacks the player like Charles from "Choo Choo Charles" I understand that this game was made on a different game creation engine, but if possible, please do a tutorial on this

  • @randomhasfwens
    @randomhasfwens 2 года назад

    Part 8 of doors idea: Screech and Dark rooms or Timothy or coins or other items,

  • @jacobfromohio5347
    @jacobfromohio5347 2 года назад

    An interesting way to move parts! I do have a question though, if a player were to stand on a lerping part, would they stay on it?

    • @GnomeCode
      @GnomeCode  2 года назад +1

      No, when you directly set the CFrame of a part you're not using the roblox physics engine (Which is required for standing on moving items). Instead you should make use of BodyMovers/Contraints for that.

    • @TheRealUnnamed0
      @TheRealUnnamed0 Год назад

      @@GnomeCode whats that

    • @triducal
      @triducal Год назад

      @@TheRealUnnamed0look it up

  • @nickkingpiggy2651
    @nickkingpiggy2651 2 года назад

    I like it i might use it for my games ??? 👌👌

  • @fatcat9000
    @fatcat9000 Год назад

    any idea how to tween an object with proximity prompts?

  • @aimbro69
    @aimbro69 7 месяцев назад

    how do u lerp model

  • @atomizerplayz
    @atomizerplayz 2 года назад

    Hey GnomeCode! Can you help me please? Im trying to code a tower defence game but right now im stuck. I cant get the tower finding zombie thing to work and i really want to create my own animations but i don't have the animation editor. So please help me.

    • @GnomeCode
      @GnomeCode  2 года назад

      The Animation Editor can now be found on the 'Avatar' tab of roblox studio

    • @atomizerplayz
      @atomizerplayz 2 года назад

      thx for help

  • @timelapseman3318
    @timelapseman3318 2 года назад

    i want to play a chinese war game but there is none that is good can you start a series on how to make a war game?

  • @DryChip
    @DryChip 2 года назад

    what about part touch sound play only for the player who touched the part it's a great idea believe me

    • @itsnotloveitslust
      @itsnotloveitslust 2 года назад

      Local Script and Remote Event.

    • @randombrandon3085
      @randombrandon3085 Год назад

      define the sound and copy it to the local players gui who fired the touch events and then play the sound. If you need help let me know I'll go in studio and make the script

  • @kenzokhqnh14
    @kenzokhqnh14 2 года назад

    Hey Gnome can you make video about gamepass and save it in shop, like "mini extra Tower Defense game" so you can buy limited tower by robux and use it in match. I hope you do it 😢

  • @robertitoOFC
    @robertitoOFC Год назад

    Make another escape game like teddy plsssssss

  • @F1Frankie2511
    @F1Frankie2511 2 года назад

    When’s the next doors tutorial

  • @iloveapplejuice5947
    @iloveapplejuice5947 2 года назад +1

    Nice

  • @gemmken
    @gemmken 2 года назад

    doors episode when? I'm waiting for the beautiful start room 👍👍

  • @Mlues
    @Mlues 2 года назад

    Hey im making a tds game i watched your first tds coding thing but it didnt work for me :C

  • @gabgabsgameworld
    @gabgabsgameworld 2 года назад

    Yo gnomecode i know the "how to make a tower defense game" series ended but how do you make a enemy that spawns another enemy (such as a necromancer or mystery in tower defense games)

  • @TheOgKingEnderKill
    @TheOgKingEnderKill 2 года назад

    when doors tutorial

  • @octobober47
    @octobober47 2 года назад

    Love the video, could we get a video on more towers from the tower defense series, like aviators or summoners that’d be super helpful! Keep the videos coming!

  • @Cowboy_Hat202
    @Cowboy_Hat202 2 года назад +1

    When another doors tutorial?

    • @GnomeCode
      @GnomeCode  2 месяца назад +1

      1 year later - It's finally here!

    • @Cowboy_Hat202
      @Cowboy_Hat202 2 месяца назад +1

      @@GnomeCode real

  • @HXMORNIC.MP3
    @HXMORNIC.MP3 2 года назад

    Gnomecode make the part 8 please

  • @Juxlaque
    @Juxlaque 2 года назад

    Hi bro, could you redo the tower defense series because each episode has bugs, are you working on it?

  • @GamerlazaMPGandBuffaGaming
    @GamerlazaMPGandBuffaGaming 2 года назад

    Hi gnomecode

  • @kendelons
    @kendelons 2 года назад

    part.CFrame.Position.X += 10 easy

    • @westside2160
      @westside2160 2 года назад

      not smooth

    • @alejandrorivera9694
      @alejandrorivera9694 2 года назад

      This would be a LOT better: part.CFrame.Position.X += ((part2.CFrame.Position.X - part.CFrame.Position.X)*0.1)
      basically takes the difference and multiplies it by 0.1 making it smooth cuz when the part is closer starts to go slower because we multiply the difference by 0.1 meaning the closer it is, the slower it is. (honestly this is a TERRIBLE option, but also an option.)

  • @rumin_al642
    @rumin_al642 Год назад

    so we can use this method for elevators in td?

  • @epixerty
    @epixerty 2 года назад

    the only downside is easing styles

    • @GnomeCode
      @GnomeCode  2 года назад

      Yes, when you go custom you don't get off the shelf tools. You could make your own custom tweenstyles with lerps if you really wanted to though. Simply a matter of adjusting the alpha value in accordance with a curve

    • @epixerty
      @epixerty 2 года назад

      @@GnomeCode yeah that's right. I don't know much about trigonometry and math in general, so I would need to do a lot of research

  • @Dolne4
    @Dolne4 2 года назад

    It would be nice to learn how to script a car so the player would be able to drive it

  • @jonac0426
    @jonac0426 2 года назад

    cool

  • @WoofyDoesStuff
    @WoofyDoesStuff 2 года назад

    Day 4 of asking gnome code to make a game like flee the facility

  • @Beta_kid
    @Beta_kid 2 года назад

    Please make more teddy

  • @twizdev
    @twizdev 2 года назад

    niceee

  • @p2l
    @p2l 2 года назад

    part.CFrame = part2.CFrame (illegal in 69 countries) (gone wrong) (omg) (real method)

    • @GnomeCode
      @GnomeCode  2 года назад

      This instantly sets it from one position to another. It doesn't 'move' as in transition from one to another

    • @p2l
      @p2l 2 года назад

      @@GnomeCode true

  • @pothangus1118
    @pothangus1118 2 года назад +1

    E

  • @blurristic
    @blurristic 2 года назад

    27th

  • @davidvrecko7
    @davidvrecko7 2 года назад

    first

  • @EpicSpider200
    @EpicSpider200 2 года назад

    First

  • @AkamiChannel
    @AkamiChannel Год назад

    I'm a simple man. I see a GnomeCode video, I give it a thumbs down. Why? Because he never puts the code where you can copy-paste it. It's offensive.

    • @Zane58_21
      @Zane58_21 7 месяцев назад

      That just makes you sound super lazy..

    • @Triploonic
      @Triploonic 5 месяцев назад

      its a tutorial. Not a free model.