How to make a smooth moving part in Roblox studio[2023]

Sdílet
Vložit
  • čas přidán 3. 01. 2023
  • Hello! today I show you how to make a smooth moving part, hope you enjoyed. Subscribe!

Komentáře • 177

  • @lenrainnn
    @lenrainnn  Před rokem +22

    Btw, sorry. The part where it cuts in the video, there is one more line on line 5 and 6, after "EndPosition" on line 5 Just put ".Position", same with "StartPosition" on line 6. Sorry for an confusion.

    • @glitchym751
      @glitchym751 Před rokem

      Im still a bit confused could i just get the code?

    • @TechnoBloxYT
      @TechnoBloxYT Před rokem +2

      @@glitchym751 every excuse to get the code, and this is one of them

    • @CA19
      @CA19 Před 11 měsíci

      When in the video did it cut?
      nvm

    • @CA19
      @CA19 Před 11 měsíci

      how do i make it so the character that stands on the moving platform can moves along with it without having to move your character as the platform moves?

    • @CosmicTRIA
      @CosmicTRIA Před 9 měsíci

      @@TechnoBloxYT bro just leave him alone hes confused and so am i, idek if i put ".Position" then "StartPosition" or just put "StartPosition" on Line 6

  • @MonkeMonk69
    @MonkeMonk69 Před rokem +7

    Bro this guy is so chill i am subscribing

  • @mistaken7996
    @mistaken7996 Před 10 měsíci +1

    Bro thank you SOO much dude, I was making an obby and I needed help making moving lasers and I struggled so much, but when I saw your simple tutorial you saved my life. Thank you so much!!!

  • @paulwhidborne1982
    @paulwhidborne1982 Před 16 dny +2

    Thanks mate, great demo! Fixed my jerky version!

  • @davidrarria
    @davidrarria Před rokem

    Very good tutorial. Now that deserves a sub and a like. Keep it up!

  • @MCXAVYT
    @MCXAVYT Před 2 měsíci +3

    Bro he is ACTUALLY hilarious and while teaching us how to do this :D :O

  • @schigggy5905
    @schigggy5905 Před rokem +1

    ty my dude good tut

  • @waterpak9511
    @waterpak9511 Před 11 měsíci +2

    holy shit dude this is so helpful, definently subbed 😭

  • @mimk180
    @mimk180 Před rokem +6

    Q: how do i make it so the character that stands on the moving platform can moves along with it without having to move your character as the platform moves?

  • @Superiordoggy54
    @Superiordoggy54 Před 25 dny

    Wow great video i really needed this in my obby.

  • @Orta_yan05
    @Orta_yan05 Před 10 měsíci +1

    good tutorial you explained the best

  • @volkswiggysimaginationprod7605

    This works! Thanks!

  • @The-Brat-Gaming
    @The-Brat-Gaming Před 4 měsíci +1

    This guy is so underated we all need to sub

  • @MannyBoy-ck6hs
    @MannyBoy-ck6hs Před 4 měsíci

    Awsome work!

  • @BlackieAndMitsu
    @BlackieAndMitsu Před rokem +2

    OMG TYSMMMMMMMMM

  • @ZacGames25
    @ZacGames25 Před 9 měsíci

    a tutorial on touching a certain part and then triggering the movement would be really nice, nice video.

  • @Noobyoulus
    @Noobyoulus Před 3 měsíci

    200th sub!

  • @louieavirblx
    @louieavirblx Před rokem +5

    Hey love the video! Gonna help out a lot. Just wondering, about the position. Instead of creating parts, could you say Position = x,y,z?

    • @lanquandude
      @lanquandude Před rokem

      This is my old account but I actually wasn't creating parts where I said TweenService:create(), I was creating a tween, which just smoothly moves the part. Also thanks!

    • @sirensnrandomstuff2678
      @sirensnrandomstuff2678 Před rokem

      @@lanquandude I think he's asking if you could make a script that could see if it has reached it's certain position it's supposed to go, and go back to it's original position. This means that if its at it's original spot, it'll move to that other position, and when it sees if it's at that certain position, it will go back to it's original position, repeating the same stuff over and over again.

  • @st0p73
    @st0p73 Před 11 měsíci +2

    Nice tutorial and thanks for explaining so well, I have watched so many other ones but none explained it as well as you did. Keep up the great work 😁

  • @timroblox618
    @timroblox618 Před 2 měsíci +1

    thank you sir!

  • @KalicoUmfields
    @KalicoUmfields Před rokem +1

    im your 40th subscriber

  • @XeviousGG
    @XeviousGG Před rokem +1

    can a similar method to this be used to extend / scale a part smoothly? trying to make a laser pointer and the laser part would need to extend depending on the distance its going.

  • @Losstkid
    @Losstkid Před 3 měsíci +1

    Thank you

  • @SUPERIORBOT
    @SUPERIORBOT Před rokem +3

    dude, 2.5k views and 26 subs? I OUGHTA SUB FOR THIS, content quality

  • @Wlwcohabwkf
    @Wlwcohabwkf Před 10 měsíci

    this is very helpful but how do i make the part only move for specific player, because im trying to make a zombie obby where at the end a helicopter came and start moving toward the winning/safezone area so people that still playing didnt see the helicopter left and never coming back

  • @Navirufernando2024
    @Navirufernando2024 Před rokem

    Can you put the script in the description or in the comments please it would help out a lot! And you earned a new subscriber! 👌👍

  • @LeKeksLP
    @LeKeksLP Před 11 měsíci +1

    THATS MY KIND OF HUMOR

  • @digis5791
    @digis5791 Před 3 měsíci +1

    thx

  • @ChonkerMan
    @ChonkerMan Před rokem +4

    Hey lenrain this is a good tutorial but Can you make another one?
    I am making a crossy road game in roblox and I need the cars to go to one side, teleport back to the beggining and repeat.
    Would this be possible?

    • @lenrainnn
      @lenrainnn  Před rokem +2

      Okay, I probably will for the next tutorial.

    • @ChonkerMan
      @ChonkerMan Před rokem +1

      @@lenrainnn Wow thanks!

    • @Luffyz.
      @Luffyz. Před rokem

      @@lenrainnn im trying to do the same thing but with a train/metro, like in the background like 5 and 5 minutes, if u do i will put the credit in my map pls!

  • @guyonyoutubee
    @guyonyoutubee Před 2 měsíci +2

    ty

  • @bossnation4235
    @bossnation4235 Před 4 měsíci

    Please make a tutorial on how to do when you touch a part it moves to where you want it

  • @InvertDoge
    @InvertDoge Před rokem +1

    i want to do this with a model, how can i do this?

  • @anaoliveira4906
    @anaoliveira4906 Před 11 měsíci

    Hii! Iam trying to do a game there, can you help me with scripts?
    Iam really good at design

  • @fourkaster
    @fourkaster Před 5 měsíci

    it didn't work because it keeps saying i have "tweenservice:create property named 'position' cannot be tweened due to type mismatch (property is a 'vector3', but given type is 'instance'", can you help me with the problem here?

  • @moisesentertainment
    @moisesentertainment Před rokem

    What did you type for put the next script

  • @hshdjdjsjjsjs6075
    @hshdjdjsjjsjs6075 Před 11 měsíci

    How do i change the script so that it spawns at the start then goes to end and then respawns instead of going back and forth

  • @Depthreat
    @Depthreat Před rokem +2

    do it when you touch a part!

  • @A4nob
    @A4nob Před 6 měsíci

    how do i make it when touching the end End Position the part teleport to the start position

  • @ExpirisYT
    @ExpirisYT Před 11 měsíci

    im trying to make a elevator with this and it doesnt work do you know how i could try to fix this?

  • @InflatedBanana
    @InflatedBanana Před rokem +2

    I would really appreciate a tut on how to activate the part moving, Could you please do that?

  • @misterverse99
    @misterverse99 Před rokem +2

    can you send the full script?

  • @TechnoBloxYT
    @TechnoBloxYT Před rokem

    video idea = camera locked on head

  • @Janes-zy9ho
    @Janes-zy9ho Před rokem +1

    Hey there, im trying to make a grouped model go Up and down. Its a leaderboard. But it eont move. Ive tried using linear but to no avail.

    • @lenrainnn
      @lenrainnn  Před rokem +1

      In the model's properties go down to PrimaryPart, click it and select the main part of the model and then put the script into the model and then make the primary part go up, also weld all of the parts together.

  • @ArthurBLOX-om9xj
    @ArthurBLOX-om9xj Před 25 dny

    does it work with models?

  • @LensLuxify
    @LensLuxify Před rokem +2

    yo that was really easy to follow :D :) but I got an error :C I don't think its your fault, because the error didn't say anything bad about the code, it just said this: "TweenService:Create property named 'Position' cannot be tweened due to type mismatch (property is a 'Vector3', but given type is 'Instance')" It kind of reminds me like downloading something on phone that can only be downloaded on PC. Do you know how to fi xthis?

    • @lenrainnn
      @lenrainnn  Před rokem

      Sorry, there is one more line on line 5 and 6, after "EndPosition" on line 5 Just put ".Position", same with "StartPosition" on line 6. There was a cut in the video that confused a lot of people. Which is why I created a new video. If it still doesn't work let me know.

    • @LensLuxify
      @LensLuxify Před rokem

      @@lenrainnn wow thanks :D :)

    • @lenrainnn
      @lenrainnn  Před rokem

      @@LensLuxify No problem.

  • @Duckgaming01
    @Duckgaming01 Před 2 měsíci

    Please someone give me the same script but it you need to touch a part in the workspace for the moving thing to move ONCE

  • @dbpedia4973
    @dbpedia4973 Před 5 měsíci

    what if the object is grouped?

  • @PeterMarkey
    @PeterMarkey Před 4 dny

    how do I do no easing style I get an error if i dont write enum.easingstyle.The easting style

  • @kanoadingusfeesh
    @kanoadingusfeesh Před 5 dny

    please make when you touch it makes two moving parts move

  • @user-rd6hr1uy5y
    @user-rd6hr1uy5y Před 23 dny

    when i did that, my character started moving back and forth, not the platform :(

  • @CIowdee
    @CIowdee Před 8 měsíci

    can u do smooth scaling

  • @hlflifeenjoyer6176
    @hlflifeenjoyer6176 Před rokem +1

    i am the 27th comment now :D

  • @Scream_vr011
    @Scream_vr011 Před 13 dny

    How do I make it teleport back?

  • @Flartmoney96
    @Flartmoney96 Před rokem

    When I run the game with this script it says on the script analysis that it was “unable to cast dictionary to tweeninfo” on the script:5

    • @lenrainnn
      @lenrainnn  Před rokem

      Make sure that on line 3, Enum.Easing Style is before Enum.Easing Direction

    • @Flartmoney96
      @Flartmoney96 Před rokem

      @@lenrainnn it is

  • @kagandurgut2540
    @kagandurgut2540 Před rokem

    what is music name?

  • @V1DIOTS
    @V1DIOTS Před 6 měsíci

    Can you do a tutorial when you click a button, the part moves and when you click it again it goes back to the same position before?

  • @TheDinoDevin
    @TheDinoDevin Před 10 měsíci

    How can i make it to where it moves but doesnt go back and fourth but it stops moving at the end position?

    • @CCL19670
      @CCL19670 Před 2 měsíci

      local Tweenservice = game:GetService("TweenService")
      local Tweeninfo = TweenInfo.new(5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0,false,0)
      local TweenToEnd = Tweenservice:Create(script.Parent, Tweeninfo, {Position = game.Workspace.End.Position })
      local TweenBack = Tweenservice:Create(script.Parent, Tweeninfo, {Position = game.Workspace.Start.Position })
      TweenToEnd:Play()
      TweenToEnd.Completed:Wait()
      TweenBack:Play()
      TweenBack.Completed:Wait()
      removed while true do and end

  • @RosesThorn
    @RosesThorn Před rokem +1

    Mine won’t work

  • @rockyinspace492
    @rockyinspace492 Před rokem +2

    i watched yours because you have a mic and you dont put annoying music buddy. dont push it

  • @skomantascepukenas1823
    @skomantascepukenas1823 Před 10 měsíci

    can`t you just copy paste that code in description so we don`t need to write

  • @paranoia6996
    @paranoia6996 Před 11 měsíci +1

    Guys help. Can someone tell me how to make the part wait a certain amount of time and then move up. Only up!. I can't find any video that will help me with this. There are only those where the part moved back and forth continuously, but I need it after a while and in one direction! Please help me. Write a script or give a link to a video.

    • @CCL19670
      @CCL19670 Před 2 měsíci

      just put a wait(5) in between the end position and start position, then move the end position over the start position

    • @CCL19670
      @CCL19670 Před 2 měsíci

      local Tweenservice = game:GetService("TweenService")
      local Tweeninfo = TweenInfo.new(5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0,false,0)
      local TweenToEnd = Tweenservice:Create(script.Parent, Tweeninfo, {Position = game.Workspace.End.Position })
      local TweenBack = Tweenservice:Create(script.Parent, Tweeninfo, {Position = game.Workspace.Start.Position })
      while true do
      TweenToEnd:Play()
      TweenToEnd.Completed:Wait()
      wait(2) -- change this number to control how long before it moves again
      TweenBack:Play()
      TweenBack.Completed:Wait()
      wait(2) -- change this number to control how long before it moves again
      end

  • @TechnoBloxYT
    @TechnoBloxYT Před rokem

    Hi! I have a question, how d you fix the glitch where the part actually is in the same position as the end and start points?

    • @lenrainnn
      @lenrainnn  Před rokem

      Is the part anchored?

    • @TechnoBloxYT
      @TechnoBloxYT Před rokem

      @@lenrainnn Yes, the problem for me is that, it moves to the position of the points, but it doesn't rotate. I am trying to make a lootbox that opens when the proximity prompt is triggered. Is there any solution?

    • @lenrainnn
      @lenrainnn  Před rokem

      @@TechnoBloxYT Yep, on lines 5 and 6 change ".Position" to ".CFrame". Position is well, just the position, CFrame is position and rotation. If it still does not work lmk.

    • @TechnoBloxYT
      @TechnoBloxYT Před rokem

      @@lenrainnn alr lemme try it.

    • @TechnoBloxYT
      @TechnoBloxYT Před rokem +1

      @@lenrainnn it works! thank you so much!

  • @SpeedyOctopus21
    @SpeedyOctopus21 Před rokem

    How do you make so once it gets to the end it stops instead

    • @CCL19670
      @CCL19670 Před 2 měsíci

      local Tweenservice = game:GetService("TweenService")
      local Tweeninfo = TweenInfo.new(5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0,false,0)
      local TweenToEnd = Tweenservice:Create(script.Parent, Tweeninfo, {Position = game.Workspace.End.Position })
      local TweenBack = Tweenservice:Create(script.Parent, Tweeninfo, {Position = game.Workspace.Start.Position })
      TweenToEnd:Play()
      TweenToEnd.Completed:Wait()
      TweenBack:Play()
      TweenBack.Completed:Wait()

  • @SpeedyOctopus21
    @SpeedyOctopus21 Před rokem

    Can you paste the script in this comment pls reply today

  • @fofinhopt1776
    @fofinhopt1776 Před 4 měsíci

    doesnt work for me, i followed every step, copied exacly the script, and still it didnt work.

  • @xJayPlayz
    @xJayPlayz Před 9 měsíci

    No longer works for those wondering. I even changed it to local script & no movement

    • @lenrainnn
      @lenrainnn  Před 9 měsíci

      Use the newer video I might even make a new one soon, I haven't really been uploading but I want to start uploading more videos soon.

    • @xJayPlayz
      @xJayPlayz Před 9 měsíci

      @@lenrainnn i did & for some reason it’s not working either. I’ve checked literally everything but either way your videos help out a lot. And yes please upload more because im still learning scripting 😅

    • @lenrainnn
      @lenrainnn  Před 9 měsíci +1

      @@xJayPlayz Alright Ill just make a new video on it eventually.

  • @FuzzieVuzzie
    @FuzzieVuzzie Před rokem +1

    when i moved the part it just yeeted

  • @B.U.G123
    @B.U.G123 Před 11 měsíci

    @lenrainn does the script not work anymore?

    • @lenrainnn
      @lenrainnn  Před 9 měsíci

      It works for some people and for some people it doesn't, so I don't really know anymore, but I'm planning on making a new video with a moving part you can actually stick too and not just fall off.

  • @LostTheDespacito
    @LostTheDespacito Před rokem

    at 5:53 he cut out the part where he changed lines 5-6, and since the lines were too long to fit the script screen, unfortunately we don't know what it is. :(

  • @Oliq_
    @Oliq_ Před 10 měsíci

    how to make it so it only moves when you are in a certain place?

    • @lenrainnn
      @lenrainnn  Před 9 měsíci

      Like when you hit an invisible wall to activate it?

    • @Oliq_
      @Oliq_ Před 9 měsíci

      @@lenrainnn for example

  • @agata4804
    @agata4804 Před rokem +1

    how can u have adds when u only have 58 subscribers?

    • @lenrainnn
      @lenrainnn  Před rokem

      to be honest I have no idea, I noticed that and I'm really confused. Okay, now I just looked it up and it says "If your video contains content to which you don't own all necessary rights, the rights holder may have chosen to place ads on it." so that might be why.

    • @agata4804
      @agata4804 Před rokem

      @@lenrainnn oooo ok then lol thanks for the info

  • @Bobgamez_YT
    @Bobgamez_YT Před rokem

    Ik it dosent work for yall cuz at 5:53 He changed lines So Dont waste yall times

  • @Pawsura
    @Pawsura Před rokem +1

    3:43

  • @dallison09
    @dallison09 Před rokem +1

    it is not working for me

    • @lanquandude
      @lanquandude Před rokem

      This is my other account, sorry it didn't work but make sure you didn't spell anything wrong, it is very sensitive.

  • @lebron_joms
    @lebron_joms Před rokem

    either im really bad at coding or this aint working

    • @lenrainnn
      @lenrainnn  Před rokem

      Sorry, there is a little cut that didn't show two lines of code. Just take a look at the new video on my channel.

  • @woakiegamer4678
    @woakiegamer4678 Před rokem

    idk why but it doesent work for me

  • @Tixz_
    @Tixz_ Před rokem +2

    didn't work for me

    • @lenrainnn
      @lenrainnn  Před rokem

      Look at the pinned comment, thats still confusing to some people so if you still don't understand the pinned comment just watch my newest video where I fix that issue.

  • @Ellttox
    @Ellttox Před rokem +2

    Doesn't work lol. everything is spelled correct.
    To anyone who sees this: Don't waste your time, find a tutorial that works

    • @lenrainnn
      @lenrainnn  Před rokem +2

      Look at the pinned comment, also you didn't spell it correctly because it worked for me.

  • @nay3ll
    @nay3ll Před 11 měsíci

    1:31

  • @ilovenickelsfrfr
    @ilovenickelsfrfr Před 10 měsíci

    Line 3 is the same as yours, but its showing incorrect for me.
    TweenService:Create property named 'Position' cannot be tweened due to type mismatch (property is a 'Vector3', but given type is 'Instance')
    And heres the code I used:
    local tweenToEnd = tweenService:Create(script.Parent, tweenInfo, {Position = game.Workspace.EndPart})

    • @lenrainnn
      @lenrainnn  Před 9 měsíci

      Try the newer tutorial, if that doesnt work either Im planning on making a new version soon, that players can actually stand on and not just fall off.

  • @kikiogoher.5011
    @kikiogoher.5011 Před rokem +2

    ew 😂 that was funny

  • @BBrownie419
    @BBrownie419 Před 5 měsíci

    Lol

  • @user-dn2ei5fv9d
    @user-dn2ei5fv9d Před rokem

    x=10 y=...any z=...any

  • @owenolvera8829
    @owenolvera8829 Před rokem +1

    why tf doesn't it work >:(

  • @rayyankhan7119
    @rayyankhan7119 Před rokem +2

    bro is watching the tut for the tut imagine

  • @Fatality24
    @Fatality24 Před měsícem +1

    It did not work

    • @lenrainnn
      @lenrainnn  Před měsícem

      Use the newest moving part tutorial. I made an updated version.

  • @VignetteOfficial
    @VignetteOfficial Před 10 měsíci

    It doesn't work i checked everything it is all the same! 🥵🥵😡😡

  • @khaledgamestyle2012
    @khaledgamestyle2012 Před 2 měsíci

    dosent work

  • @Xxo_Ena
    @Xxo_Ena Před 3 měsíci

    yes, it's very trash, it's the only one that worked

  • @pigzelAi
    @pigzelAi Před 4 měsíci

    if its so trash then I'm not actually gonna watch it

  • @piotrlisowski7144
    @piotrlisowski7144 Před 12 dny

    0/10, copied everything, doesn't work

    • @lenrainnn
      @lenrainnn  Před 10 dny

      Works in the video and for a lot of people in the comments, so you made an error somewhere.

  • @2peoples785
    @2peoples785 Před 10 měsíci +1

    I found out this can work with co-rods: local TweenService = game:GetService("TweenService")
    local TweenInfo1 = TweenInfo.new(400, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false,0)
    local TweenToEnd = TweenService:Create(script.Parent, TweenInfo1, {Position = Vector3.new(123,15,0)})
    local TweenBack = TweenService:Create(script.Parent, TweenInfo1, {Position = Vector3.new(123,15,-66)})
    while true do
    TweenToEnd:Play()
    TweenToEnd.Completed:Wait()
    TweenBack:Play()
    TweenBack.Completed:Wait()
    end

  • @JukoTV
    @JukoTV Před rokem +1

    Workspace.MovePart.Script:1: Expected ')' (to close '(' at column 38), got 'TweenService' this fail messega coming at me what did i do wrong

    • @JukoTV
      @JukoTV Před rokem

      i fixed it now but it doesnt work

    • @lenrainnn
      @lenrainnn  Před rokem

      Read the pinned comment or watch the updated video on a moving part.

  • @alensday2974
    @alensday2974 Před 2 dny +1

    local Tweenservice = game:GetService("TweenService")
    local Tweeninfo = TweenInfo.new(5, Enum.EasingStyle.sine, Enum.EasingDirection.InOut, 0,false,0) -- set this to the number you want and the style you want
    local TweenToEnd = Tweenservice:Create(script.Parent, Tweeninfo {Position = game.Workspace.EndPosition.Position} )
    local TweenBack = Tweenservice:Create(script.Parent, Tweeninfo {Position = game.Workspace.StartPosition.Position} )
    while true do
    TweenToEnd:Play()
    TweenToEnd.Completed:Wait()
    TweenBack:Play()
    TweenBack.Completed:Wait()
    end
    hope this helps 🤗

  • @Jkmjst
    @Jkmjst Před rokem +1

    mine does not work do you see a problem?______________________________________________________________________________________________________________________________________________________ local Tweenservice = game:GetService("TweenService")
    local Tweeninfo = TweenInfo.new(6, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0,false,0)
    local Tween = Tweenservice:Create(script.Parent, Tweeninfo {Position = game.Workspace.EndPosition.Position})
    local TweenBack = Tweenservice:Create(script.Parent, Tweeninfo {Position = game.Workspace.StartPosition.Position})
    while true do
    Tween:Play()
    Tween.Completed:Wait()
    TweenBack:Play()
    TweenBack.Completed:Wait()
    end

    • @kyanlittle-king9100
      @kyanlittle-king9100 Před rokem +2

      also thanks for the code i didnt have to type it all the way this way lol

    • @isama_rou
      @isama_rou Před 11 měsíci

      line 3 you put a 6 but u need to put a 5

    • @isama_rou
      @isama_rou Před 11 měsíci

      still at line 3 you put .since but it was .Bounce

  • @johannessebastian834
    @johannessebastian834 Před 5 měsíci +1

    i hope this forking script work here is the type
    local tweenservice = game:getservice(''tweenservice'')
    local tweeninfo = tweeninfo.new(5, enum.eastingstyle.sine, enum.easingdirection.inout, 0,false,0)
    local tweentoend = tweenservice:create(script.parent, tweeninfo, {postiton =game.workspace.end position.po
    local tweenback = tweenservice:create(script.parent, tweeninfo, {postiton =game.workspace.end position.p
    while true do
    tweentoend:play( )
    tweentoend.completed:wait( )
    tweenback:play( )
    tweenback.completed:waited( )
    end FORK IT DIDN'T WORK I THINK

  • @keagan54894
    @keagan54894 Před rokem

    It did not work

    • @lenrainnn
      @lenrainnn  Před rokem

      Yeah look at the pinned comment and if you still don't understand that then watch the new video.