open and close the box using a for loop(code in description) | roblox | for문을 이용해 상자 여닫기 | 로블록스

Поділитися
Вставка
  • Опубліковано 9 лют 2025
  • model download: create.roblox....
    code
    -------------------------------------
    local value = false
    script.Parent.wood1.ProximityPrompt.Triggered:Connect(function()
    if not value then
    value = true
    script.Parent.wood1.ProximityPrompt.ActionText = "close"
    for i = 1, 15 do
    script.Parent:SetPrimaryPartCFrame(
    script.Parent.Part.CFrame * CFrame.Angles(math.rad(10), 0, 0)
    )
    wait()
    end
    else
    value = false
    script.Parent.wood1.ProximityPrompt.ActionText = "open"
    for i = 1, 15 do
    script.Parent:SetPrimaryPartCFrame(
    script.Parent.Part.CFrame * CFrame.Angles(math.rad(-10), 0, 0)
    )
    wait()
    end
    end
    end)

КОМЕНТАРІ •