How to Move a GUI on the Screen (Drag) - Roblox Studio Tutorial

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

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

  • @TechwithMikeYT
    @TechwithMikeYT  3 года назад +18

    You get parentheses...you get parentheses...everyone gets parentheses!

  • @GalCon99
    @GalCon99 Год назад +4

    Like others said before: a good, to-the-point tutorial with sufficient explanation of everything without treating the audience like children who touch Roblox Studio for the first time. Thank you very much!

  • @brawldude2656
    @brawldude2656 3 года назад +5

    Clear and simple. Not boring and not too fast. Thats what i call a professional tutorial!

  • @Papaintion
    @Papaintion 3 года назад +9

    Man, you're soo underrated. Even with the outro.

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

      Are you saying you're not a fan of my outro 😯

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

      @@TechwithMikeYT your outro is underrated. Which is good

    • @TechwithMikeYT
      @TechwithMikeYT  3 года назад +3

      Lol thanks 👍

    • @cristianospohr69
      @cristianospohr69 3 года назад +1

      @@Papaintion I feel bad for him now but idc

  • @MasterBroNetwork
    @MasterBroNetwork 3 года назад +3

    You get a subscription from me because this is the best implementation that I've found that isn't a buggy mess and a thumbs up for such a good tutorial.

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

    Thank you so much for this wonderful tutorial, the pace, explaination and recapping is really excellent and appreciated. I replicated this as part of learning how to drag / drop ImageLabels for a card game I was considering. Two findings - 1) doesn't work when UIGridLayout is included within the parent frame 2) if you have two UI items of the same size (e.g. playing cards) each using this script, when positioned one on top of the other, you'll loose the ability to drag the item beneath.

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

      Its common programing thing to do water in cup thing, u have 2 cups with water and need to replace water inside, u need temporary cup, put cup1 in tempCup, then cup2 to cup1 and tempCup to cup2, now replace cups with frames

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

    imagine two squares overlapping with each other perfectly and you cant take them apart

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

    local frame = script.Parent
    frame.Draggable = true
    frame.Active = true
    frame.Selectable = true
    technically frame.Draggable is depreciated, but this still does work, alongside DragBegin and DragStopped.

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

      Thank you!

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

      thanks bro this solved my problem lol

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

      like you said, it's deprecated. do not use deprecated code. since if it breaks roblox will never fix it

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

    Thanks for the help! 👍

  • @anshu_yataa
    @anshu_yataa 3 года назад

    Now I can make a my windows game,thanks!

  • @mag1c625
    @mag1c625 3 года назад +1

    Can you please make a turtorial on how to make a npc that attacks you (dosent respawn)

  • @balajibiswas1062
    @balajibiswas1062 3 года назад +1

    hello tech with mike i am a working to make a game can you make a video about how to make a winning gui like i am making a fps game 50 player will drop in the island if a person kill survive from the 50 people he will get a massage like you have won the game . If you help me i will be really thank to you . please help me .

  • @ali-el6jd
    @ali-el6jd 3 года назад

    thank you! really helped alot with my game.

  • @west8772
    @west8772 3 года назад

    this is gonna be useful for my game (its like pokemon but with no pokemon), btw you gotta make some merch man, you will get alot of sales (Im 100% gonna buy it), if you dont have much experience designing merch I can make one for you (for free)

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

    Thanks man youre the best!!!

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

    Back in the days there was a draggable property. You could do all of that without needing to script. Shame it was deprecated

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

    apparently my GUI can drag around without a script and I want it to stop

  • @meinertr
    @meinertr 3 года назад +1

    Thanks So Much :)

  • @WaffleTM420
    @WaffleTM420 3 года назад +1

    Guys use this instead plus it's so much more short:1.script.Parent.Active = true 2.script.Parent.Draggable = true and there you go 2 lines

    • @TechwithMikeYT
      @TechwithMikeYT  3 года назад

      If I missed that, that would be hilarious lol. I will check it out later.

    • @WaffleTM420
      @WaffleTM420 3 года назад

      @@TechwithMikeYT your tutorials are very good! I subbed to you

    • @WaffleTM420
      @WaffleTM420 3 года назад

      Did the other way work Mike?

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

    Make one about how to make a flight command

  • @necorvus4940
    @necorvus4940 3 года назад

    Idea: How to make Emote gui Costume!!

  • @Prismane9999
    @Prismane9999 3 года назад +1

    hey tech, can you make a tutorial about a spectate gui?

  • @skyblox-eo5se
    @skyblox-eo5se 3 года назад +1

    Pls make a house system that update when you leave. 🥺 Plss

  • @meh1sbad
    @meh1sbad 3 года назад

    dude your great new sub!

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

    Hippity hoppity your code is now my property

  • @aureliolumia8509
    @aureliolumia8509 3 года назад

    hi bro beauty video

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

    and how to make gu unable to go beyond the screen! It's possible, right? If yes, can you do it?

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

    When I drag the part even a little too fast it the mouse glitches out the block stops moving. is there a work around, or just a limitation of roblox?

  • @black_1009
    @black_1009 3 года назад

    Make a survival game series

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

    so, little "issue", I want to detect when the frame reaches an exact position, the thing is that the frame is only moved Visually, the actual position remain s the same. How can I "fix" that?

  • @Gramerr
    @Gramerr 3 года назад

    Hi! Can you make a script that makes it so when you kill a player, you get money? And i need to know how to make a money gui on the left of the screen! It would really help me since im new to Studio!!

  • @Igeeig3065
    @Igeeig3065 3 года назад

    could you make a border? so you cant move the dragging frame outside the border.

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

    how to i do it so there is a stop like a border?

  • @JoseGarcia-ko5fk
    @JoseGarcia-ko5fk 3 года назад +1

    Please can you do a radar of players for each team please :D

  • @thesibsrblx7322
    @thesibsrblx7322 3 года назад +1

    Hello did u check the mining system?

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

      Not yet sorry, I will try to take a look tomorrow

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

      Try this for the tool script. Still a slight issue when you are too close to the rock, but it has a cooldown and the hit detection seems better. Let me know how this works for you, and then we can go from there
      local tool = script.Parent
      local swing = true
      tool.Handle.Touched:Connect(function(otherPart)
      if otherPart.Name == 'Rock' then
      wait()
      tool.Mining.Value = false
      end
      end)
      local function mine()
      if swing then
      swing = false
      tool.Mining.Value = true
      local str = Instance.new("StringValue")
      str.Name = "toolanim"
      str.Value = "Slash"
      str.Parent = tool
      wait(0.5)
      swing = true
      else
      return
      end
      end
      tool.Activated:Connect(mine)

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

      @@TechwithMikeYT it works thank you!

  • @ziryith
    @ziryith 3 года назад

    Hey mike, do you know how to make a teleport button that when you click it, it teleports you to another game?

  • @piratedog5525
    @piratedog5525 3 года назад

    I like how he says easy in the thumpnail but the video is 16 mins long

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

      the tutorial is long, but easy to follow

  • @FuntimePopularBro
    @FuntimePopularBro 3 года назад

    That seems like a nice way to wipe my window

  • @Anastasiatoons
    @Anastasiatoons 3 года назад

    How to make a part start to talk (not the chat system) how a dialouge gui when you touch it?

  • @LigxhtF1ree
    @LigxhtF1ree 3 года назад

    Hiii!!! Can you make a block that moves that can push a block off a ramp or a part?? Please I never got someone to help me with this I’m subbed and liked the video!

    • @inferno1257
      @inferno1257 3 года назад

      Just resize the part to your liking and unanchor it.

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

    Tu so much !

  • @metz0043
    @metz0043 3 года назад

    I’m trying to run this script with another one. I have a small script where when you press a block the GUI pops u and there’s a little x on it to remove it. I want to be able to use that script but also move it around any tips? When I add them both to 1 script only the one works. Which is popping the GUI up from the block.

  • @VelorTex
    @VelorTex 3 года назад

    do you know how to remove a tool when used? if so make a video please

  • @rainbowoof
    @rainbowoof 3 года назад

    Hey Mike, i was wondering... Do you know how to make an advanced car crash system? Like in car crushers 2. Where the car deforms

    • @ched4085
      @ched4085 3 года назад

      constraints. lots of constraints.

  • @zorrodeminecraft7742
    @zorrodeminecraft7742 3 года назад +1

    I want do but me mom dont give me pc :(

  • @tafaa001jr4
    @tafaa001jr4 3 года назад

    This is awesome

  • @fplayg
    @fplayg 3 года назад

    Suggestion: A sword which teleports the player who got hit to another game

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

      script.Parent.Touched:Connect(function(part)
      if part.Parent:FindFirstChildOfClass("Humanoid") then
      local TeleportService = game:GetService("TeleportService")
      local gameId = --The place you want them to teleport to
      TeleportService:Teleport(gameId)
      end

  • @DezLandPlayz
    @DezLandPlayz 3 года назад

    Do you do private teaching for hire?

  • @crainics2818
    @crainics2818 3 года назад

    How to make play button with moving background 🙃 if you dont want comment down bellow say no Ty

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

    What about Mobile?

  • @cyanblox_w
    @cyanblox_w 3 года назад

    Pls help me build shop i create game!

  • @donutonyt9764
    @donutonyt9764 3 года назад

    Draggabe = true

  • @JoseGarcia-ko5fk
    @JoseGarcia-ko5fk 3 года назад +1

    good :D

    • @JoseGarcia-ko5fk
      @JoseGarcia-ko5fk 3 года назад +1

      Please can you do a radar of players for each team please :D

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

    The video:
    Me: script.parent.active,script.parent.draggable = true,true

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

    or just do NameOfUrFrame.Draggable = true

  • @Валера-в8м
    @Валера-в8м 3 года назад

    Think

  • @loltest8402
    @loltest8402 3 года назад

    local UIS = game:GetService('UserInputService')
    local frame = script.Parent
    local dragToggle = nil
    local dragSpeed = 0.25
    local dragStart = nil
    local startPos = nil
    local function updateInput(input)
    local delta = input.Position - dragStart
    local position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
    startPos.Y.Scale, startPos.Y.Offset + delta.Y)
    game:GetService('TweenService'):Create(frame, TweenInfo.new(dragSpeed), {Position = position}):Play()
    end
    frame.InputBegan:Connect(function(input)
    if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
    dragToggle = true
    dragStart = input.Position
    startPos = frame.Position
    input.Changed:Connect(function()
    if input.UserInputState == Enum.UserInputState.End then
    dragToggle = false
    end
    end)
    end
    end)
    UIS.InputChanged:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
    if dragToggle then
    updateInput(input)
    end
    end
    end)

  • @aliceverdugo5556
    @aliceverdugo5556 3 года назад +1

    first :>

  • @cristianospohr69
    @cristianospohr69 3 года назад

    I Like Your Videos, Also I Think HD Admin Uses This Like *b r o . . . .*

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

    easy, but not as simple, script.Parent.Draggable = true

  • @cristianospohr69
    @cristianospohr69 3 года назад

    yo i think HD admin uses this XD

  • @cristianospohr69
    @cristianospohr69 3 года назад

    :( now it doesn't work *crys*