I need help with a very simple script that I have that is about :Moveto() that I also copied from the wiki.
The Script
local dummy = game.Workspace:WaitForChild("Dummy")
local human = dummy.Humanoid
local GreenFlag = game.Workspace.GreenFlag
human:MoveTo(GreenFlag.PrimaryPart.Position)
When I test this code to see if the Dummy would go to the GreenFlag I get this error in the output:
So why is it not working if it’s from the wiki? am i missing something?
The PrimaryPart is a BasePart (think parts, meshes, unions) that models use as a reference for rotating and moving. The reason that PrimaryPart should be set is because you are using GreenFlag.PrimaryPart.Position!