Hello,
Im currently trying to figure out how to make a spaceship with the roblox TweenService and its all going good so far until i started 'tweening', there is nothing 'wrong' with my code. I want to get the UpVector of a part and tween it from there but the parts instead of going straight up they go a little to the side.
local tweenService = game:GetService("TweenService")
-- These three parts are wielded together with stage 2 as 'center' part
local Stage1 = script.Parent:WaitForChild("Stage1")
local Stage2 = script.Parent:WaitForChild("Stage2")
local finalStage = script.Parent:WaitForChild("FinalStage") --
local studs = script.Parent:WaitForChild("Studs").Value -- how high up it should go (set to 50)
local stage1Fire = Stage1:WaitForChild("Fire"):WaitForChild("ParticleEmitter") -- ignore this
local luanchButton = script.Parent:WaitForChild("Luanch"):WaitForChild("Detector")
local tweenInfo = TweenInfo.new(
script.Parent.MaxVel.Value / 60, -- just so i could set studs per minute
Enum.EasingStyle.Quad,
Enum.EasingDirection.In,
0,
false,
0
)
local function luanch()
local properties = {
CFrame = CFrame.new(Stage2.CFrame.UpVector * Vector3.new(1, studs, 1)) -- I think its somwhere here the problem is.
}
local tween = tweenService:Create(Stage2, tweenInfo, properties)
tween:Play()
end
luanchButton.Triggered:Connect(luanch) -- Im using a ProximityPrompt
I have created a video here if i have been bad at explaning
Thanks for taking your time!

3 comments
Thanks, it really helped!
You should really accept the answer then
i tried but i didnt know how before, now i know