if success then
timeDecider()
destDecider()
task.wait(time)
for humanoid, destinationVector in pairs(path:GetWaypoints()) do
if pathfindEnabled == false then
print("pathfindEnabled == false")
break
end
print("success")
humanoid:MoveTo(destinationVector)
humanoid.MoveToFinished:Wait()
end
RunServ.Heartbeat:Wait()
else
warn(errorMessage)
end```
#Workspace.Bonnie.BonnieBasic:71: attempt to index number with 'MoveTo' - Server - BonnieBasic:71
1 messages · Page 1 of 1 (latest)
what is destinationVector
I think it’s because you’re naming an int value “humanoid” but using it as an instance
lemme check documentation rq
yeah :GetWaypoints() returns an array therefore “humanoid” is an int
or something like that
yup
i tried it but i figured this would happen
Workspace.Bonnie.BonnieBasic:65: Expected identifier when parsing variable name, got 'in' - Studio - BonnieBasic:65
what solution would you recommend?
ah, wait
lemme try fixing it myself first
before asking you
do you have a variable named "in"?
or something
i do not have a variable named in
trying this out because its in pairs
it worked but it did not pathfind like i wanted it to, gonna do some more testing and such
thank you guys for the help
i appreciate it
movetofinished:wait() is a newb trap do it properly like shown on that page 👍