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

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

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

  • @jimams_jamz5518
    @jimams_jamz5518 Год назад +6

    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 😭

  • @melkerrrrr
    @melkerrrrr Год назад +1

    congrats on 100 subscribers
    edit: great video as always

  • @BossMan-by3lc
    @BossMan-by3lc Год назад

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

  • @TeletacosRobloxTutorials
    @TeletacosRobloxTutorials  Год назад +5

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

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

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

  • @BeepSheepHello
    @BeepSheepHello Год назад +1

    Amazing tysm
    Btw 3rd :)

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

    Literally life saver! Thank you so much!

  • @Gabriel-os9pg
    @Gabriel-os9pg Год назад

    Amazing as always

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

    That helped a lot! I subscribed, thank you.

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

    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

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

    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

  • @eddj0ked
    @eddj0ked Год назад +3

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

    • @Hashbrownsandsausages
      @Hashbrownsandsausages 2 месяца назад

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

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

    Yas I love creating functions :O)

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

    Thank you so much!

  • @jxck_xy
    @jxck_xy 9 месяцев назад +1

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

    • @sealio28
      @sealio28 2 месяца назад

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

  • @xceu6743
    @xceu6743 3 месяца назад

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

  • @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??

  • @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

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

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

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

    can you make a script for the custom proximity prompt

  • @TheRealHawkBM
    @TheRealHawkBM Год назад +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

  • @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 11 месяцев назад

    and make a player get i speed every sec.

  • @jesseland4523
    @jesseland4523 11 месяцев назад

    i can make a npc move

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

    it doesn't show a press e button

  • @jesseland4523
    @jesseland4523 11 месяцев назад

    it doesnt work but i still love ur vids

  • @jesseland4523
    @jesseland4523 11 месяцев назад

    clickbait