Roblox Proximity Prompt Door Tutorial

Поділитися
Вставка
  • Опубліковано 5 лют 2025

КОМЕНТАРІ • 7

  • @Supremenent
    @Supremenent 8 місяців тому +4

    local TweenService = game:GetService("TweenService")
    local prompt = script.Parent
    local Door = prompt.Parent.Parent
    local Base = Door:WaitForChild("Base")
    local Hinge = Door:WaitForChild("Hinge")
    local HingeOpen = Door:WaitForChild("HingeOpen")
    local HingeClosed = Door:WaitForChild("HingeClosed")
    local debounce = true
    prompt.Triggered:Connect(function(player)
    if debounce then
    debounce = false
    local isOpen = Door:GetAttribute("IsOpen")
    Door:SetAttribute("IsOpen", not isOpen)
    isOpen = not isOpen
    if isOpen then
    prompt.ActionText = "Open"
    local tween = TweenService:Create(Hinge, TweenInfo.new(0.35), {CFrame = HingeOpen.CFrame})
    tween:Play()
    tween.Completed:Wait()
    else
    prompt.ActionText = "Closed"
    local tween = TweenService:Create(Hinge, TweenInfo.new(0.35), {CFrame = HingeClosed.CFrame})
    tween:Play()
    tween.Completed:Wait()
    end
    debounce = true
    end
    end)

  • @VermeilChan
    @VermeilChan 22 дні тому

    thanks

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

    THANK YOU

  • @Supremenent
    @Supremenent 8 місяців тому

    great tutorial buddy but could you make it like gta5 where your character pushes the door open with there hand or body?

  • @coolbeansdude3857
    @coolbeansdude3857 8 місяців тому +1

    Could you make a video on how you approach OOP in Roblox?

    • @coolbeansdude3857
      @coolbeansdude3857 8 місяців тому +1

      I’ve been trying to make an object oriented voting system so I can create UI based votes for anything like voting for a map, gamemode, or player. Just gotten kind of confused on the part of client to server when checking when a player presses the vote button

    • @MrModuleScript
      @MrModuleScript  8 місяців тому

      Currently in the works :) since it's a more difficult topic to explain the tutorial will take a little to complete.