Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED BY ME] Position-tweening boat model keeps going below the skybox. How can i fix this?

Asked by 5 years ago
Edited 5 years ago
01-- Variables
02local ts = game:GetService("TweenService")
03local Destination = 1
04local boat = script.Parent.Parent
05-- Vector destinations
06local placestogo = {Vector3.new(0.782, -7.5, -116.367), Vector3.new(35.282, -7.5, -82.117), Vector3.new(120.5, -7.5, -53.25)}
07-- function to tween the boat
08function tweenBoat(goal,thingToDo)
09    if thingToDo == "turn" then
10        local tweeninfo = TweenInfo.new(8,Enum.EasingStyle.Linear, Enum.EasingDirection.InOut,0,false,0)
11        local cframeValue = Instance.new("CFrameValue", script.Parent)
12        cframeValue.Value = script.Parent.CFrame
13        local tween = ts:Create(cframeValue, tweeninfo, {Value = goal})
14        tween:Play()
15        cframeValue.Changed:Connect(function()
View all 58 lines...

So, the boat keeps going under and then returns without its other parts to destination 1 once it reaches destination 3. How can i fix this? I am not sure what is going wrong.

0
code blocks >:C greatneil80 2647 — 5y

Answer this question