Move to script won't work

Hi all
I am making a horror game in which the antagonist pops out of a portal
But for some reason the move to script is not working

Here’s the script

local Doll = game.Workspace.Doll2
local Humanoid = Doll.Humanoid
Doll.HumanoidRootPart.CFrame = game.Workspace.Rio1.CFrame
game.Workspace.Major1.CanCollide = false
Humanoid:MoveTo(game.Workspace.Riot1)

game.Workspace.Doll2.AI.Disabled = false

and this is the error that shows up when
Unable to cast Instance to Vector3

it says the problem is in line 6

you can get the vector by getting the object position
not the object itself or instance

Humanoid:MoveTo(game.Workspace.Riot1.Position)
3 Likes

Also check your spelling.
In the 3rd line you use Rio1.
in the 5th line you use Riot1.

no that was intentional as i suck in coming up with names