Button to Make Parts Disappear Tutorial | ROBLOX Studio

Поділитися
Вставка
  • Опубліковано 1 чер 2024
  • In this tutorial, I explain how to create a button that makes a part dissapear.

КОМЕНТАРІ • 140

  • @brettmichel3
    @brettmichel3 3 роки тому +73

    local part = workspace.Part
    local button = workspace.button
    local clickDetector = button.ClickDetector
    function onClicked()
    part.Transparency = 1
    part.CanCollide = false
    end
    clickDetector.MouseClick(onClicked)
    :)

    • @O_O-zf7xz
      @O_O-zf7xz 2 роки тому +1

      Thx Too Much

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

      Thanks soo much i really couldnt be bothered

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

      Thank u

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

      tysm

    • @tiko3267
      @tiko3267 2 роки тому +2

      Thanks for writing the script and thanks to Chezerton Chez for making this video i support

  • @bluthehusky15
    @bluthehusky15 3 роки тому +18

    Me who learns on the internet in 7 minutes how to code something
    School: 3 hours take it or leave it

  • @goldchimera5369
    @goldchimera5369 2 роки тому +6

    can you make it so a gui can toggle a part's transparency?

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

    can u show me how i just completely destroy/delete the part as a script and in a button gui?

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

    hey Chezerton, i want to do this but it doesnt seem to work. do you have a new version of it>

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

    is there a way to make something dissapear and then another thing appear with one click?

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

    Is there a way that i can make a GUI textbutton destroy a part with a 5 second countdown if so please tell me i need help anything would be useful :D

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

    Does anyone know how to make a button (like a text or image button) that makes a part disappear upon being pressed?

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

    Can you make a video on doing this with proximity Prompt

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

    how do i make that on a morph? like with a button on the screen instead of a block

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

    5:57
    Can you tell me what that MouseClick part says? I can't quite see it well and I don't know if I am doing it right.

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

      On line 10 it says clickDetector.MouseClick:Connect(onClicked)
      Hope that answers your question :)

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

      @@chezertonchez6985 Thanks bro!

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

    How do i make a trigger that when i stand on it makes the block dissappear?

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

    how do you make it to where it appears again after a short amount of time

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

    it works with a mesh model?

  • @noobydev3010
    @noobydev3010 Рік тому +4

    if you have a text label that wont disapear put this script:
    local part = workspace.Part
    local button = workspace.button
    local clickDetector = button.ClickDetector
    function onClicked()
    part.Transparency = 1
    part.CanCollide = false
    part.SurfaceGui.TextLabel.Visible = false
    end
    clickDetector.MouseClick:Connect(onClicked)
    then your text label will not be visible

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

    how do i make it so a model deletes in stead of disaper

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

    Very good tutorial, but how do I do it but with images?

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

    other than that very good

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

    I want a mesh/part to appear after i press a button do u know how to make it? also first i want it to have collisions disabled so u don't walk on an invisible part

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

      In the script turn "Can collide" to "True"

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

      ^^

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

      @@Flammper i already learned enough scripting i can now make it so don't worry

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

      i just realized how much I've learned in just 3 months

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

      @@epixerty nice!

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

    thanks Broo

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

    How do I make it delete a part?

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

    thanks it worked. *very cool*

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

    how do i make it apply to a model to save time for when i'm trying to make it destroy a whole set of parts?

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

      First you must specify the model as you would with any object in the workspace. If you wanted to destroy a model use something like this:
      local model = workspace.model --Specifies the model
      model:Destroy() --Destroys the model

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

      @@chezertonchez6985 how would i go about making it wait and then destroy the model?

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

      also on touch with another block, so when you walk through the trigger it destroys the model after a few seconds*

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

    is there a way to make a part spawn with a button?

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

    why the youtubers never leave the script in the descrtion

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

    how do i make it so it re- appears so that other people cant just run threw without pressing anything?

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

      Make it a local script so it only disappears for the player who pressed the button

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

    Thanks for your share!
    I add Screen GUI in the Appear Part. When I touch the first part the second part disappear as you show us. but I can click the Screen GUI and it Appears. Can you make a code to disable or enabled Screen GUI when we touch the first part. NOTE: I put the Screen GUI in the second part that disappears. Hope you can make a video about this! Thanks anyway! 👍👌

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

      ua-cam.com/video/3XNLm23zjK8/v-deo.html - Hope this helps

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

      @@chezertonchez6985 thanks for your video ☺️
      i find the code to touch the part to disable the touch
      Enable or Disable script .....
      anyway....big thanks 👍💝😊

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

    Is there a script where it will take like 10 seconds then it will dissapear? Im trying to make a fnaf 6 game in roblox! Its ok if not

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

      Yes, there is a way to do that! What you do is put in the wait function which is "wait(Seconds)". All it does it does is stop whatever the script is doing for the amount of seconds you put into the function.
      Replace whatever is in the script with this code:
      local part = workspace.Part
      local button = workspace.button
      local clickDetector = button.ClickDetector
      function onClicked()
      wait(10)
      part.Transparency = 1
      part.CanCollide = false
      end
      clickDetector.MouseClick(onClicked)

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

      @@chezertonchez6985 Thank you so much!!! Im subbing!

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

      @@chezertonchez6985 For some reason it doesnt work, i dont know what is wrong

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

    so what would the script be for making it visible and can collide?

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

    Does this work if you group it into a model?

  • @MadladxSC
    @MadladxSC 2 роки тому +2

    how to you make it where you can press E and it disappears?

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

      You can use a proximity prompt, there are other comments on this so I will make a video about it

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

      @@chezertonchez6985 Ok cool

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

    how to make it reappear?

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

    Can we also just straight up use the destroy() built in function?

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

      i think so

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

    edit: nvm I fixed it

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

    The Script Didn't Work

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

    can you make it with more then 1 block

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

      just make multible parts then make it a union

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

    can someone tell me the script beacause i cant see it

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

    how do you make it reappear after 3 seconds?

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

    U gonna upload on how to reappear it?

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

      just set the transparency to 1 and can collide to true instead of the other way around

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

      Follow this tutorial to make a part appear and disappear with just one click:
      ua-cam.com/video/zPdZKQdDnWA/v-deo.html

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

      @@flycatcher219 but how do you do it after it dissapeared

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

    how do you make so instead of using a click it uses proximity prompt

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

      There are other comments about this topic so I will make a video on it shortly, thanks for your comment

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

      @@chezertonchez6985 yup

    • @Firefly-oi4mw
      @Firefly-oi4mw Рік тому

      make a part add a proximity prompt then add a normal script to the prompt then put script.Parent.Triggered:Connect(function(plr)
      game.Workspace.PARTNAMEHERE.Transparency = 1
      game.Workspace.PARTNAMEHERE.CanCollide = false
      end)

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

      @@Firefly-oi4mw bro you saved my life

    • @Firefly-oi4mw
      @Firefly-oi4mw Рік тому

      @@mauscreck7734 its alr

  • @brogen.c
    @brogen.c 2 роки тому

    I want to do this but instead of a click button, a button that you walk on

    • @Firefly-oi4mw
      @Firefly-oi4mw Рік тому

      script.Parent.Touched:Connect(function()
      game.Workspace.THEPARTNAMEHERE.Transparency = 1
      end)

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

    its not working????

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

    It doesn't work?

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

    the thing is i wanna know how to make somethin appear but theres no tutorials
    for that lol

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

      With this tutorial u can make parts appear and disappear:
      ua-cam.com/video/zPdZKQdDnWA/v-deo.html

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

    9 months later- no work :C

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

    How do you make it appear again?

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

      You can make it appear and disappear by following this tutorial:
      ua-cam.com/video/zPdZKQdDnWA/v-deo.html

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

    how to bring it back

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

      Follow this tutorial, you can make a part appear and disappear in just one click:
      ua-cam.com/video/zPdZKQdDnWA/v-deo.html

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

    How do i make so it comeback?

    • @Firefly-oi4mw
      @Firefly-oi4mw Рік тому

      you can make a script so it puts it into server storage then deletes it into workspace then make it so it can take it out of server storage back into workspace (as a loop)

  • @Hannah-bd1md
    @Hannah-bd1md 3 роки тому

    How do you make a model disappear?

  • @Flammper
    @Flammper 2 роки тому +2

    can you do it so when you click the button it appears? Btw great video! :D

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

      thats pretty easy, Just change part.Transparency = 1 to part.Transparency = 0

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

    Eat everything!

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

    it didn't work

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

    it doesn't work tho

  • @user-vu4sc9to8y
    @user-vu4sc9to8y Рік тому

    please write code in coments

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

    idk but it doesnt work

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

    Didn’t work. It’s useless learning to script. But the vid is amazing!

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

    Outdated and doesn't work in 2022.

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

    bruh its not working :(

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

    How do I make it reappear?

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

      I'll make a video on it tonight.

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

      @@chezertonchez6985 Yea you did

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

      @@chezertonchez6985 Hows it doing with the video 5 months later?

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

      You can make it appear and reappear with this tutorial:
      ua-cam.com/video/zPdZKQdDnWA/v-deo.html

  • @GuilhermeM1
    @GuilhermeM1 2 роки тому +5

    amazing it never works for me

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

      ua-cam.com/video/zPdZKQdDnWA/v-deo.html

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

      Me too each tut i follow it fails😊

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

    Doesn't work.

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

    reappear?

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

      Follow this tutorial:
      ua-cam.com/video/zPdZKQdDnWA/v-deo.html

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

    hi

  • @waves8
    @waves8 День тому

    btw this is too old and no longer works, sorry!

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

    didnt work

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

    Can you do this but you need to step on the trigger instead of clicking it? Pls help me yall. 😭

    • @Firefly-oi4mw
      @Firefly-oi4mw Рік тому

      script.Parent.Touched:Connect(function()
      game.Workspace.PARTNAMEHERE.Transparency = 1
      end)