Roblox Studio - How to make Sliding Doors

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.พ. 2025
  • Script :
    -- Services --
    local TS = game:GetService("TweenService")
    -- Variables --
    local Door = script.Parent
    local TouchPart = script.Parent.TouchPart
    local Open = false
    -- Settings --
    local Time = 1
    -- Script --
    -- Opens the door --
    TouchPart.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
    Open = true
    if Open then
    TS:Create(Door.PrimaryPart, TweenInfo.new(Time), {CFrame = Door.DoorOpened.CFrame}):Play()
    Open = false
    end
    end
    end)
    -- Closes the door --
    TouchPart.TouchEnded:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
    Open = false
    if not Open then
    TS:Create(Door.PrimaryPart, TweenInfo.new(Time), {CFrame = Door.DoorClosed.CFrame}):Play()
    Open = true
    end
    end
    end)

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

  • @AllProGAmer11
    @AllProGAmer11 16 วันที่ผ่านมา

    No way a W underrated youtuber

  • @quandilustenbinguslorsodo1501
    @quandilustenbinguslorsodo1501 16 วันที่ผ่านมา +1

    praise Jesus whoever believes in him is saved read your bible and live for God amen!

    • @stars7438
      @stars7438  16 วันที่ผ่านมา +1

      Amen!

    • @Wet_water1
      @Wet_water1 16 วันที่ผ่านมา

      how do i start believing in god if i dont believe him at all... (i want to be saved)