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

How to subtract one from the total position of this?

Asked by 5 years ago
01while true do
02    wait(1)
03    local target = findNearestTorso(script.Parent.HumanoidRootPart.Position)
04    if target ~= nil then
05        script.Parent.Humanoid:MoveTo(target.Position, target)
06        load3:Stop()
07        load:Play()
08         script.Parent.Humanoid.MoveToFinished:Wait()
09        load:Stop()
10        load2:Play()
11        load2:Stop()
12        load3:Play()
13    end
14 
15end

Basically, when the robot comes to you it just pushes you so the move to never finishes, there for the animations doesn't play, I tried subtracting the values using - vector3(1,1,1) but it usually gave me a table error.

1 answer

Log in to vote
1
Answered by
crueluu 169
5 years ago
Edited 5 years ago

Try Using Vector3.new(-1,-1,-1) The Script Thought The Vector3 Was A Table You Forgot To Add .new

Ad

Answer this question