Alright, while doing a script, I try making a tween on a vehicle, and what it is supposed to do is
go up and down to lock the trailer and unlock, (the detach script not posted its the same but the true and false opposite.). Sadly, this only locks on to one position weirdly. Please tell me how to fix it as that would be awesome.
local TS = game:GetService("TweenService")
local TInfo = TweenInfo.new(1, Enum.EasingStyle.Quart)
local theWeld = script.Parent.Parent.Parent.lock.Weld
local Part = script.Parent.Parent.Parent.lock.Pole
local Pos = Part.Position
local Size = Part.Size
local Goal = {}
Goal.Position = Vector3.new(Pos.x+0, Pos.y-1, Pos.z+0)
local Tween = TS:Create(theWeld, TInfo, Goal )
script.Parent.Triggered:Connect(function(player)
Tween:Play()
script.Parent.Parent.Attach.Enabled = false
script.Parent.Parent.Detach.Enabled = true
end)