i want to rotate tween a part, i have a wait(10) set up, but when i playtest it plays the tween without waiting 10 seconds.
this is my script:
local part = script.Parent
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local ti2 = TweenInfo.new(-1, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out)
local propertyToTween = {Orientation = Vector3.new(0, 42.4, 0), Position = Vector3.new(195.983, 5.106, 87.994)}
local propertyToTween2 = {Orientation = Vector3.new(0, -90, 0), Position = Vector3.new(198.374, 5.106, 88.817)}
local tweenOpen = ts:Create(part, ti, propertyToTween)
local tweenClose = ts:Create(part, ti2, propertyToTween2)
local function open()
tweenOpen:Play()
end
local function close()
tweenClose:Play()
end
wait(4)
open()
wait(5)
close()
i dont see what i’m doing wrong.