Hey there!
I am trying to tween a part for a door that slides. However, whenever I play the tween, instead of going along the axis (the z axis) it moves to the side and then down. I have tried changing the values, but nothing seems to work.
Here’s my script, used with a wedge for a sliding door:
local TweenService = game:GetService("TweenService")
local Wedge1 = script.Parent.Parent.Wedge1
local Wedge2 = script.Parent.Parent.Wedge2
local Info = TweenInfo.new(
3,
Enum.EasingStyle.Sine
)
local Wedge1OpenGoals = {
Position = Vector3.new(0, 0, -15)
}
local Wedge1CloseGoals = {
Position = Vector3.new(0, 0, 15)
}
local TweenTest = TweenService:Create(Wedge1, Info, Wedge1OpenGoals)
wait(10)
TweenTest:Play()