How to make an E to open door- Roblox Studio 2022

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

ความคิดเห็น • 38

  • @jimams_jamz5518
    @jimams_jamz5518 ปีที่แล้ว +7

    tysm, I've been trying to get a working door from different videos for 3 HOURSSSS but it wasn't working, and now it works. I appriciate u dawg 😭

  • @redspacex9717
    @redspacex9717 2 หลายเดือนก่อน

    man , thx so much . Finally i made functioning door without free models . I set the Model's primary part to Hinge and it works now :D

  • @BossMan-by3lc
    @BossMan-by3lc ปีที่แล้ว +1

    Appreciate the help bro, saved me like 2 hrs of building man, liked and subbed

  • @Luke_alaxander
    @Luke_alaxander 2 ปีที่แล้ว +1

    Amazing seeing people helping others. I wish you the best!

  • @MandoFan12
    @MandoFan12 ปีที่แล้ว +1

    Literally life saver! Thank you so much!

  • @melkerrrrr
    @melkerrrrr 2 ปีที่แล้ว +2

    congrats on 100 subscribers
    edit: great video as always

  • @premiumcodi9666
    @premiumcodi9666 ปีที่แล้ว +1

    That Helped Me For The Game, Thx, And Also, I Change The Script A little For The Sound Of The Door, And For An ObjectText In The ProximityPrompt

  • @TeletacosRobloxTutorials
    @TeletacosRobloxTutorials  2 ปีที่แล้ว +6

    Don't forget to set the hinge to the primary part!

    • @angelaisnotcool
      @angelaisnotcool ปีที่แล้ว +1

      bro I CANT FIND PRIMARY PART HELP

  • @zpinestherussian
    @zpinestherussian 2 ปีที่แล้ว +1

    That helped a lot! I subscribed, thank you.

  • @Gabriel-os9pg
    @Gabriel-os9pg 2 ปีที่แล้ว +1

    Amazing as always

  • @LibrettoGamerYT
    @LibrettoGamerYT 2 ปีที่แล้ว +7

    local tweenService = game:GetService("TweenService")
    local doors = script.Parent:GetChildren()
    local function Tween(object, goal, easingStyle, tweenTime)
    local tween = tweenService:Create(object, TweenInfo.new(tweenTime, easingStyle), goal)

    return tween
    end
    for i, model in pairs(doors) do
    if model:IsA("Model") then
    for i, part in pairs(model:GetChildren()) do
    if part ~= model.PrimaryPart and part:IsA("BasePart") then
    local weld = Instance.new("WeldConstraint")
    weld.Parent = model.PrimaryPart
    weld.Part0 = model.PrimaryPart
    weld.Part1 = part

    part.Anchored = false
    end
    end
    end
    end
    for i, model in pairs(doors) do
    if model:IsA("Model") then
    local open = false
    local debouce = false

    local prompt1 = Instance.new("ProximityPrompt")
    prompt1.Parent = model.Handle1
    prompt1.ActionText = "Open"

    local prompt2 = Instance.new("ProximityPrompt")
    prompt2.Parent = model.Handle2
    prompt2.ActionText = "Open"

    prompt1.Triggered:Connect(function(player)
    if debouce == false then
    debouce = true

    if open then
    open = false
    prompt1.ActionText = "Open"
    prompt2.ActionText = "Open"

    local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(100), 0)}, Enum.EasingStyle.Sine, 1)
    tween:Play()
    else
    open = true
    prompt1.ActionText = "Close"
    prompt2.ActionText = "Close"
    local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(-100), 0)}, Enum.EasingStyle.Sine, 1)
    tween:Play()
    end
    task.wait(1)
    debouce = false
    end
    end)

    prompt2.Triggered:Connect(function(player)
    if debouce == false then
    debouce = true
    if open then
    open = false
    prompt1.ActionText = "Open"
    prompt2.ActionText = "Open"
    local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(100), 0)}, Enum.EasingStyle.Sine, 1)
    tween:Play()
    else
    open = true
    prompt1.ActionText = "Close"
    prompt2.ActionText = "Close"
    local tween = Tween(model.PrimaryPart, {CFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(-100), 0)}, Enum.EasingStyle.Sine, 1)
    tween:Play()
    end
    task.wait(1)
    debouce = false
    end
    end)
    end
    end

  • @yannoahhc8240
    @yannoahhc8240 2 ปีที่แล้ว

    Yas I love creating functions :O)

  • @Uni.VeE.Offical
    @Uni.VeE.Offical ปีที่แล้ว +1

    it's working, but when i open and close it i can't open or close again, why??

  • @NukegamerboyRA
    @NukegamerboyRA ปีที่แล้ว

    Thank you so much!

  • @eddj0ked
    @eddj0ked ปีที่แล้ว +3

    it isnt hsowing the E button for me and the parts also keep falling

    • @Hashbrownsandsausages
      @Hashbrownsandsausages 7 หลายเดือนก่อน

      did you weld, make it a model, anchor the correct parts and add a proximity prompt???

  • @jxck_xy
    @jxck_xy ปีที่แล้ว +1

    How do you make the door open in the opposite direction?

    • @sealio28
      @sealio28 7 หลายเดือนก่อน

      6 months late response but the solution I found out was to just rotate the door vertically.

  • @BeepSheepHello
    @BeepSheepHello 2 ปีที่แล้ว +2

    Amazing tysm
    Btw 3rd :)

  • @amelbennia8282
    @amelbennia8282 4 หลายเดือนก่อน

    My problem is the hing isnt in the primaty part and i dont know how to fix it

  • @xceu6743
    @xceu6743 7 หลายเดือนก่อน

    my door opens but it wont close, i've tried changing the script a bit but none would work

  • @BobaIsMad
    @BobaIsMad ปีที่แล้ว

    Always gotta pay attention to it or else it fail 🍷🗿

  • @mr.lolbob3455
    @mr.lolbob3455 ปีที่แล้ว

    Hello. very cool. Question: Is it possible for AI to open and close the same door?

    • @Royal-94
      @Royal-94 ปีที่แล้ว +1

      I dontk ow much about code, but i know the logic, you can make that when the AI aproaches, it opens the door automatically, you cane make the game detect if the AI is there and close

  • @MagicsMalice
    @MagicsMalice 2 ปีที่แล้ว

    can you make a script for the custom proximity prompt

  • @TheRealHawkBM
    @TheRealHawkBM 2 ปีที่แล้ว +1

    My door keeps falling down into pieces and yes I anchored it but idk why it keeps falling down

    • @IdkKrudzi
      @IdkKrudzi ปีที่แล้ว +1

      same i m very confused

  • @jesseland4523
    @jesseland4523 ปีที่แล้ว

    and make a player get i speed every sec.

  • @victorclausen2879
    @victorclausen2879 ปีที่แล้ว +1

    it doesn't show a press e button

  • @angelaisnotcool
    @angelaisnotcool ปีที่แล้ว +1

    i cant find primarypart

    • @P34CH1SM3
      @P34CH1SM3 ปีที่แล้ว +2

      You have to add model to the door folder! I was confused too

  • @jesseland4523
    @jesseland4523 ปีที่แล้ว

    i can make a npc move

  • @jesseland4523
    @jesseland4523 ปีที่แล้ว

    it doesnt work but i still love ur vids

  • @jesseland4523
    @jesseland4523 ปีที่แล้ว

    clickbait