#tweening a door

3 messages · Page 1 of 1 (latest)

neon sentinel
#
local Folder = game.Workspace.Doors:GetChildren()
local ts = game:GetService('TweenService')
local debounce = false

for _, door in pairs(Folder) do
    local cd = door:FindFirstChild('ClickDetector')
    local function Open()

    local open = ts:Create(door, 1.6, {['CFrame'] = door.CFrame * CFrame.new(0,door.Size.Y, 0)})
    local close = ts:Create(door, 1.6, {['CFrame'] = door.CFrame})
        if cd then
          if debounce == false then
            debounce = true
            open:Play()
            wait(2)
            close:Play()
            wait(1.6)
            debounce = false
            end
        end
    end
    cd.MouseClick:Connect(Open)
end

all doors with click detector in folder are supposed to be able to tween open
error is line the first tween 'Unable to cast double to tweenInfo'

neon sentinel
#

ok ill try that

#

bro is a genius 🤯 thank you so much