Having trouble getting UpVector while tweening to make a rocket, is there any solution to this?
Asked by
4 years ago Edited 4 years ago
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.
01 | local tweenService = game:GetService( "TweenService" ) |
04 | local Stage 1 = script.Parent:WaitForChild( "Stage1" ) |
05 | local Stage 2 = script.Parent:WaitForChild( "Stage2" ) |
06 | local finalStage = script.Parent:WaitForChild( "FinalStage" ) |
08 | local studs = script.Parent:WaitForChild( "Studs" ).Value |
10 | local stage 1 Fire = Stage 1 :WaitForChild( "Fire" ):WaitForChild( "ParticleEmitter" ) |
12 | local luanchButton = script.Parent:WaitForChild( "Luanch" ):WaitForChild( "Detector" ) |
14 | local tweenInfo = TweenInfo.new( |
15 | script.Parent.MaxVel.Value / 60 , |
16 | Enum.EasingStyle.Quad, |
17 | Enum.EasingDirection.In, |
23 | local function luanch() |
25 | CFrame = CFrame.new(Stage 2. CFrame.UpVector * Vector 3. new( 1 , studs, 1 )) |
28 | local tween = tweenService:Create(Stage 2 , tweenInfo, properties) |
33 | luanchButton.Triggered:Connect(luanch) |
I have created a video here if i have been bad at explaning
Thanks for taking your time!