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
local tweeninfo = TweenInfo.new(8,Enum.EasingStyle.Linear, Enum.EasingDirection.In,0,false,0)
        local vectorlookat = Instance.new("Vector3Value", script.Parent)
        vectorlookat.Value = goal
        local vectorvalue = Instance.new("Vector3Value", script.Parent)
        vectorvalue.Value = script.Parent.Position
        local tween = ts:Create(vectorvalue, tweeninfo, {Value = goal})
        tween:Play()
        vectorvalue.Changed:Connect(function()
            if (script.Parent.Position - goal).magnitude > 1 then -- Error here
                local position = vectorvalue.Value
                script.Parent.Parent:SetPrimaryPartCFrame(CFrame.new(position, vectorlookat.Value)) 
            end 
        end)
        tween.Completed:Wait()
        vectorlookat:Destroy()
        vectorvalue:Destroy()

        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