Hello there! I'm trying to move a part 13 studs using TweenService without having to use a certain position on the Z axis, I tried to use the current Z axis position and adding 13 with "ZAxis + 13" and other ways but none seem to work and I couldn't find any way to fix this.
The script:
local tweenService = game:GetService("TweenService")
local Button = script.Parent
local XAxis = script.Parent.Position.X
local YAxis = script.Parent.Position.Y
local ZAxis = script.Parent.Position.Z
local tweeningInformation = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
-1,
true,
0
)
local ButtonProperties = {
Position = Vector3.new(ZAxis + 13, YAxis, ZAxis)
}
local Tween = tweenService:Create(Button, tweeningInformation, ButtonProperties)
Tween:Play()
I hope somebody can help me and thanks in advance!

2 comments
Does it do anything? Also you have Z axis twice and dont use X.
Thank you for pointing that out! Somehow I didn't notice and that's why the script wasn't working.