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

[SOLVED BY ME] Attempt to compare number and boolean?

Asked by 4 years ago
Edited 4 years ago
01local tweeninfo = TweenInfo.new(8,Enum.EasingStyle.Linear, Enum.EasingDirection.In,0,false,0)
02        local vectorlookat = Instance.new("Vector3Value", script.Parent)
03        vectorlookat.Value = goal
04        local vectorvalue = Instance.new("Vector3Value", script.Parent)
05        vectorvalue.Value = script.Parent.Position
06        local tween = ts:Create(vectorvalue, tweeninfo, {Value = goal})
07        tween:Play()
08        vectorvalue.Changed:Connect(function()
09            if (script.Parent.Position - goal).magnitude > 1 then -- Error here
10                local position = vectorvalue.Value
11                script.Parent.Parent:SetPrimaryPartCFrame(CFrame.new(position, vectorlookat.Value))
12            end
13        end)
14        tween.Completed:Wait()
15        vectorlookat:Destroy()
16        vectorvalue:Destroy()
17 
18        print("Moving tween sucess!")

Help plz

0
well can you show what vectorlookat and vectorvalue is laurenbtd5 379 — 4y
0
ok R_LabradorRetriever 198 — 4y
0
done, I put more of the script in R_LabradorRetriever 198 — 4y

Answer this question