Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My lookVector tween script doesn't move the part? [closed]

Asked by 5 years ago
Edited 5 years ago

i figured it out

I don't know whats happening here... I thought I followed the tutorial? guess it wasn't right.

open = false
door = script.Parent.Parent.Base

local tweenservice = game:GetService("TweenService")
local info = TweenInfo.new(1,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)

local doorOpen = {CFrame = door.CFrame + door.CFrame.LookVector*12}
local doorClose = {CFrame = door.CFrame}

local open = tweenservice:Create(door,info,doorOpen)
local close= tweenservice:Create(door,info,doorClose)

script.Parent.ClickDetector.MouseClick:Connect(function()
    if open == false then
        open:Play()
        wait(2.5)
        open = true
    else
        close:Play()
        wait(2.5)
        open = false
    end
end)

its supposed to move a small hatch and it just doesn't move. any help?? :\

the error I got was : "Error TweenService:Create property named "CFrame' cannot be tweened due to type mismatch (property is a 'CoordinateFrame' , but given type is 'Vector3'"

0
Are there any errors you get? climethestair 1663 — 5y
0
sorry for not being active, but the error I got was : "Error TweenService:Create property named "CFrame' cannot be tweened due to type mismatch (property is a 'CoordinateFrame' , but given type is 'Vector3'" scrawli 6 — 5y

Answer this question