Create an Elevator Using Prismatic Constraints! - Roblox Studio Tutorial

Поділитися
Вставка
  • Опубліковано 13 чер 2024
  • In this video, I show you how to use prismatic constraints to create an elevator. I go over how they work, how to set them up, and how to script the logic for our elevator. Hope you enjoy!
    ▻Comment any questions down below!
    ▻Make sure to leave a like 👍
    ▻Subscribe!
    / @bricey
    ▻Join my Discord!
    / discord
    Check out some more Roblox Content!
    ▻Object Oriented Programming:
    • OOP in Roblox #1 - Int...
    MAn5FqdtZIG-3Gsp4z
    ▻Making a Key Card door:
    • Key-Card Door in Roblo...
    VaMQKxAdv0BA-LoUryn
    ▻General Roblox Scripting:
    • Using Object Values to...
    Music:
    www.bensound.com/
  • Ігри

КОМЕНТАРІ • 125

  • @FinGuideUK
    @FinGuideUK 3 роки тому +9

    Just to say that you have a very good teaching skills - you explain stuff in a clear and understandable manner.
    Thanks a lot. Please consider making a video about body position. All the best.

  • @David360playz
    @David360playz 7 місяців тому

    Yo this is actually so epic, helped me so much! Keep up the good work! :)

  • @javipachuflo
    @javipachuflo Рік тому +1

    The outro blew my ears.
    I love it.

  • @Cowwy
    @Cowwy 3 роки тому +2

    Thank you so much. Understanding it much better now. :D

  • @oskiebadoskie
    @oskiebadoskie 3 роки тому +2

    this channel is underrated- I subbed.

  • @CatalyzeThis101
    @CatalyzeThis101 3 роки тому

    Nice turorial as always!

  • @yoru83yoru
    @yoru83yoru 2 роки тому

    Thanks. Good Tutorial :D

  • @Windows-cs9hi
    @Windows-cs9hi 3 роки тому +1

    THATS EXACLY WHAT I NEEDED

  • @deltadeveloperr
    @deltadeveloperr Рік тому +1

    Very good building trick, thank u! i made a elevator with no a lot of scripts

  • @guillermobarroso2990
    @guillermobarroso2990 3 роки тому +12

    Im not sure if i wrote the script wrong or if its outdated already
    I like it when the script is in the description so i don't have to lose my sanity to make something

    • @starvinios
      @starvinios 3 роки тому +3

      Reminder every peace of code has to be correct

    • @aliennathan6089
      @aliennathan6089 2 роки тому +1

      i got the same problem

    • @aurecthee
      @aurecthee 2 роки тому +1

      @@starvinios local clickDetector = script.Parent.Clicker.ClickDetector
      local pc = script.Parent.Shaft.PrismaticConstraint
      local up = false
      clickDetector.MouseClick:Connect(function()
      up = not up

      pc.TargetPosition = up and 0 or -319
      end)

    • @_pakoreii
      @_pakoreii 2 роки тому

      @@aurecthee Thanks

  • @nimmitripathy940
    @nimmitripathy940 3 роки тому +1

    Quality Content!!!!!!!!!!

  • @soillong9755
    @soillong9755 3 роки тому +1

    this vid is underated

  • @baconeggsssesdad3675
    @baconeggsssesdad3675 Місяць тому

    Great video! Thank you I struggled a bit at first. Script works for 2024. Be aware of the target position I forgot the - before the value and it took a minute for it to work. Also make sure your adding your target position and not the videos.
    -- Access the ClickDetector and PrismaticConstraint
    local clickDetector = script.Parent.Clicker.ClickDetector
    local pc = script.Parent.Shaft.PrismaticConstraint
    -- Variable to track the state (up or down)
    local isUp = false
    -- Function to handle mouse click event
    clickDetector.MouseClick:Connect(function()
    -- Toggle the state
    isUp = not isUp
    -- Set the target position based on the state
    if isUp then
    pc.TargetPosition = 0 -- Move to the up position (0)
    else
    pc.TargetPosition = -27 -- Move to the down position (-27)
    end
    end)

  • @sanyasi9552
    @sanyasi9552 3 роки тому

    It helped alot

  • @user-cm5lt3du4s
    @user-cm5lt3du4s 3 роки тому +5

    Good tutorial! Please, can you make controllable plane?

    • @BRicey
      @BRicey  3 роки тому

      I tried that a few months ago and it went horribly, but I can try again

    • @user-cm5lt3du4s
      @user-cm5lt3du4s 3 роки тому

      @@BRicey I almost made my plane, but it flies and only works normally in the first person :( If I become to third persons then it can turn over..

  • @Amritss664
    @Amritss664 13 днів тому

    There is an issue with prismatics and a reason why tweening would be preferred:
    Tweens take up less network resources
    Just because constraints don’t require any action on your part to replicate to clients doesn’t mean it has no network cost. In fact, they have more network cost,. Instead of a simple event telling clients that the door has closed, it now has to replicate the exact position of the door.
    Constraints, obviously, are bound by physics
    Sometimes, accurate physics simulation is a bad thing. While Roblox’s physics engine has gotten better, it is not infallible. It will break sometimes. Tweens ignore physics and keep moving. So, if a player puts something in the elevator shaft, for example, a constraint-based elevator would break and a tween-based elevator would clip through the object. This would probably lead to the object either being flinged to oblivion or inside the elevator, but regardless, the elevator remains functional.
    And being bound by physics, players can exploit the system
    Roblox distributes the task of simulating physics to players to save server resources. This is even after FilteringEnabled. This means an exploiter could, in theory, break the elevator if the server lets it simulate the elevator’s physics. There is probably a setting to stop this, but I’m not sure.

  • @someidiot6356
    @someidiot6356 3 роки тому

    Perfection.

  • @LhexterMorales
    @LhexterMorales 3 роки тому +1

    Ty!

  • @Xizilqou
    @Xizilqou 3 роки тому +1

    this could be useful for making things like cannons.

  • @jasperdeblock8632
    @jasperdeblock8632 3 роки тому +3

    i was today making an elevator but it was to glitchy i tried tweening, lerping, with a loop changing the y axe.... and then i opened youtube and this was on my front page.... XD im lucky

  • @wiktorvideos4234
    @wiktorvideos4234 3 роки тому

    thank you

  • @evanslater4551
    @evanslater4551 3 роки тому

    How can I use buttons such as floor numbers instead of just a red brick. I have created a panel with buttons on to weld against the wall but when I do this, it doesn't move down.

  • @munakas101
    @munakas101 Рік тому +3

    Tried this, but for some odd reason I cannot make the ClickDetector button to work. It just doesn't respond.

  • @impacticle504
    @impacticle504 3 роки тому

    ty so much this is so easy to do !

  • @amy.k7320
    @amy.k7320 2 роки тому +1

    how do you get the object to slide across

  • @yeetnut9245
    @yeetnut9245 3 місяці тому

    I'm confused. I did the exact things that he did and then when I clicked play it didn't go down, can someone help me please? Also, I tried to put the prismatic constraints together at the same exact place like the way he did, and it doesn't work. I think this is very out dated

  • @evanslater4551
    @evanslater4551 3 роки тому

    I’ve made the red brick but when I press the brick, the elevator doesn’t go up again

  • @TheRedLT
    @TheRedLT 3 роки тому

    Is there a way to slow down the speed in which it goes up and down?

  • @bigManKelp
    @bigManKelp 3 роки тому

    I want to like a million times

  • @bread9521
    @bread9521 3 роки тому +1

    Tween service is more likely for doors but I tried it on making lifts but it's very shaky

    • @BRicey
      @BRicey  3 роки тому +1

      exactly why I use this method

    • @abu0082
      @abu0082 2 роки тому

      I would recommend using prismatic constraints if it works for you, but if it doesn't like me I just used an animation to animate the elevator.

  • @CheckM8
    @CheckM8 Місяць тому

    The platform keeps getting stuck in the shaft, any idea how to fix?

  • @frisher_name9016
    @frisher_name9016 3 роки тому

    can u make it slower that when you press the button that the elevator going lower

  • @CrankyWinston
    @CrankyWinston 5 місяців тому

    Hi, is there a way that I can make the platform go up automatically with a model on it without buttons? I would like it to go up only when there is a model with a player loaded inside of it, if anyone can help me. Thank YOU!!

  • @zeusbolt9712
    @zeusbolt9712 3 роки тому +2

    First :)

  • @glenreidy
    @glenreidy 3 роки тому

    How would you have the elevator go up, wait, then come back down with just one click?
    I have tried but I can't get the elevator to wait before it comes back down.

    • @evanslater4551
      @evanslater4551 3 роки тому

      I cant even get the elevator to go back up. It goes down to the floor and then the prismatic constraint becomes inactive

  • @smileysproduction5245
    @smileysproduction5245 3 роки тому +1

    It didnt work, the elevator is moving by itself up and if i press the button, nothing works

  • @abrathecadabra
    @abrathecadabra 2 роки тому +1

    when setting the lower limit to -20, for some reason it goes to the lift's front, if you set it to 20 it goes to its back, is there any way to fix this?

  • @peanutinatree7191
    @peanutinatree7191 Рік тому +1

    again, just like the last video a watched, it works for everyone but me... i have it with the prismatic constraints connecting the two, but the platform just doesnt move.

    • @irinabacal9598
      @irinabacal9598 4 місяці тому

      I actually encountered the same problem, did everything as suggested and it didn't work at first. Tried it again and found the mistake. The second time I actually didn't group the objects and I noticed that if you change the material of the part it can influence its mass, so try to set the ServoMaxForce to a greater value if you`ve changed the material of the part to a havier one such as metal or concrete.

    • @Azeedyx
      @Azeedyx Місяць тому

      Or set it as a 'massless'

  • @ruinhonor1078
    @ruinhonor1078 3 роки тому +2

    what code do I use for it to go up and down constanly every 5 seconds?

    • @quezzert
      @quezzert 3 роки тому +6

      lets say the prismatic constraint is set to a variable called p
      the highest point is 0, and the lowest point is -20
      while true do
      p.TargetPosition = 0
      wait(5)
      p.TargetPosition = -20
      wait(5)
      end

  • @Originss_
    @Originss_ 3 роки тому +2

    Heya, How can i make a second button that calls the elevator? i tried to Make a second button and rename its parts and even clickdetector and i just put new scripts like
    local clickDetector2 = script.Parent.Clicker2.ClickDetector2
    and
    clickDetector2.Mouseclick:Connect(Function()
    up = not up
    pc.TargetPosition = up and 0 or -20
    end)
    But when i tried the elevator would not move at all i checked the Prismatic Constraint and it was reading corectlly but not moving at all... can you help me?

    • @soillong9755
      @soillong9755 3 роки тому

      use my pack

    • @Originss_
      @Originss_ 3 роки тому

      @@soillong9755 Where..... not even a link.

  • @BeautifulBinBag
    @BeautifulBinBag 10 місяців тому

    thank for elp

  • @grunmtmented8299
    @grunmtmented8299 Рік тому +1

    doesn’t work for me when i click it it doesn’t go up or down

  • @capitua8246
    @capitua8246 2 роки тому

    Can you make it turn with a button?

  • @Xizilqou
    @Xizilqou 3 роки тому +2

    Could you make a video on how to make certain players have certain scripts? Like instead of putting it in starter player scripts I could make only a few people have it. I'm having trouble figuring out how to do this and maybe you could help.

    • @landonolson6753
      @landonolson6753 3 роки тому

      Just make a script that clones it from serverstorage into the players backpack after checking if the constraint you are looking for is true

  • @SerialDesignation.N.
    @SerialDesignation.N. 23 дні тому +1

    heres the script:local clickDetector = script.Parent.Clicker.ClickDetector
    local pc = script.Parent.Shaft.PrismaticConstraint
    local up = false
    clickDetector.MouseClick:Connect(function()
    up = not up
    pc.TargetPosition = up and 0 or -20
    end)

  • @grantjames3226
    @grantjames3226 3 роки тому +3

    Also, would I be able to change the speed of the lift?

    • @BRicey
      @BRicey  3 роки тому +1

      Use the Velocity property to do that.

    • @grantjames3226
      @grantjames3226 3 роки тому +1

      B Ricey ok thanksss

  • @jeanninejones498
    @jeanninejones498 3 роки тому

    how can you change the speed?

  • @justacommenter9389
    @justacommenter9389 5 місяців тому

    How do i make them stronger

  • @taypexalt
    @taypexalt 2 роки тому

    This is cool, but tweening is better xD

  • @misterrober2847
    @misterrober2847 2 роки тому

    Is this optional to low the speed of that?

  • @bseriesvqjohn
    @bseriesvqjohn 2 роки тому

    For some reason, it can't lift anything other than players, no matter if you set the force to like "inf" or "99999....." it won't lift properly or at the speed it's set to. If there's a way around this, anyone, do let me know.

    • @ItsRubenX
      @ItsRubenX Рік тому +1

      What have you tried lifting up? Parts?

  • @grantjames3226
    @grantjames3226 3 роки тому +1

    What’s the point of the target position? What does it do

  • @Flip_panti
    @Flip_panti 2 роки тому

    Ummm Can you post that ele to tool box??

  • @ShadowMan-qu7dy
    @ShadowMan-qu7dy Рік тому

    can u make a cortex elevator

  • @xxchelseaxx423
    @xxchelseaxx423 Рік тому

    Can you rig multiple parts to it like a full on elevator?

  • @evanslater4551
    @evanslater4551 3 роки тому

    Does this only work for platforms or can it work for a realistic lift with a roof and walls?

    • @glenreidy
      @glenreidy 3 роки тому

      I think it should work. Just make sure the roof, clicker and walls of the lift are welded and not anchored. If that doesn't work I would either mess with the settings to give the lift more power or make sure the lift isn't in the shaft or touching the outer walls/doors.

    • @evanslater4551
      @evanslater4551 3 роки тому

      @@glenreidy I can get it to go down but it wont go up again. I tried doing it with just the platform like in this video but it still doesnt work. When it is down it seems like the prismatic constraint becomes inactive.

    • @glenreidy
      @glenreidy 3 роки тому

      @@evanslater4551 try altering the power settings.

    • @glenreidy
      @glenreidy 3 роки тому

      My ServoMaxForce is set as 150005

  • @SafoanPlayz
    @SafoanPlayz 3 роки тому

    plz show how to make E to pick up do run a function using module scripts im having some problem making my project if u upload it would be great!

  • @evanslater4551
    @evanslater4551 3 роки тому +1

    This will really help but I wanna know how you can get working buttons and floor calls

  • @GqmingDudeYT
    @GqmingDudeYT 2 місяці тому

    It’s not working in 2024 do you mind helping me

  • @dward4535
    @dward4535 3 роки тому

    Hey, idk why but i can't use any of it (Surface, Constrains, Hinge, etc). Did anybody know what's wrong with my studio?

    • @brickplank_films5189
      @brickplank_films5189 3 роки тому

      roblox took it off because of the new update.

    • @dward4535
      @dward4535 3 роки тому

      @@brickplank_films5189 aww, that's too sad :(
      btw thanks for the info

  • @sonic_dude420
    @sonic_dude420 3 роки тому

    Whenever I try it the platform just gets stuck on the pole

    • @glenreidy
      @glenreidy 3 роки тому

      I just had that problem. Turns out the clicker was anchored.

  • @jfhsd4
    @jfhsd4 Рік тому

    i spected a comment of the script

  • @HayFatwithSurf
    @HayFatwithSurf 4 місяці тому

    "Sometimes you get bounced up" it makes no sense for you not to get bounced up at that speed.

  • @What-ys4bv
    @What-ys4bv 3 роки тому

    Can I use this on ziplines horizontally?
    Edit: This video is made on my birthday.

    • @BRicey
      @BRicey  3 роки тому

      Yes! Happy (late...) Birthday!

    • @What-ys4bv
      @What-ys4bv 3 роки тому

      @@BRicey thx

  • @sfsodz8419
    @sfsodz8419 3 роки тому

    9:06 VISSIBLE CONFUSION

  • @lavinia5482
    @lavinia5482 10 місяців тому

    idk why but my elevator is flinging the player up

  • @soilder76commanderinaction
    @soilder76commanderinaction 3 роки тому +1

    Do you know how to make a elimination GUI where when you eliminate someone you it says eliminated player in roblox studio

    • @pumpkinkan1058
      @pumpkinkan1058 3 роки тому

      add me on discord (pumpkin#5143) and i will guide you through the scripting

  • @SH4DYCLIPS
    @SH4DYCLIPS 3 місяці тому

    mine doesnt bounce me up :(

  • @WaitWutDaGD
    @WaitWutDaGD 2 роки тому

    i couldnt do it idk why

  • @0TUGIRA0
    @0TUGIRA0 2 роки тому

    Now Teach us how to do it with btools

  • @randomdude5075
    @randomdude5075 2 роки тому

    model pleaseeee!!

  • @C1RCUSM4XIMUSVR
    @C1RCUSM4XIMUSVR 2 роки тому

    the create thing is gone

  • @bayun_0077
    @bayun_0077 2 роки тому

    name game ?

  • @Anomalyfyed
    @Anomalyfyed 3 роки тому

    it wont worked for me

  • @MarxismOfficial
    @MarxismOfficial Рік тому

    Nice but my top part wont fall down

  • @landonolson6753
    @landonolson6753 3 роки тому

    Wouldn’t it be easier and smoother to just use tweenservice?

  • @MarxismOfficial
    @MarxismOfficial Рік тому

    can't you just give us a free model

  • @idklol332
    @idklol332 3 роки тому

    can you give me model im having problems doing it

  • @sinoxiz988
    @sinoxiz988 2 роки тому

    dont work, my message has ben delleted beacause i has hate dont work

    • @joseluisdominguezmijangos4233
      @joseluisdominguezmijangos4233 2 роки тому

      i do it, place the PrismaticConstraint on the Part that moves,
      see "elevator". drive.google.com/file/d/11ZtM4ABFIxmwe8oMq5lRzX7b2q-rjgo9/view?usp=sharing, the file

    • @joseluisdominguezmijangos4233
      @joseluisdominguezmijangos4233 2 роки тому

      with buttons, drive.google.com/file/d/1mbLuP1vWJHj4gFYluSPyPenkaIP0Fpxa/view?usp=sharing

  • @JerielordPlays
    @JerielordPlays 11 місяців тому

    It does not work

  • @impro7090
    @impro7090 3 роки тому

    ur speaking too quiet at 100 volume i can barely hear

  • @cg7240
    @cg7240 2 місяці тому

    doesnt work dude

  • @reeky_one
    @reeky_one 2 роки тому

    bit too fast bruv