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

Unable to cast value to object???

Asked by 5 years ago

print("Armytruck touched this") while true do local player = game.Workspace.NPC player.Humanoid:MoveTo(Vector3.new(0,0,0),game.Workspace.End.Position) wait() end

The error from Roblox Studio: Unable to cast value to object

Why do i get this error. What does it mean?

0
do you know what line it says it on? lon233bcc 31 — 5y
0
This Line: player.Humanoid:MoveTo(Vector3.new(0,0,0),game.Workspace.End.Position) BaconX112X 75 — 5y

1 answer

Log in to vote
2
Answered by 5 years ago

moveTo() only works for models and you're trying to move a players humanoid... Another thing you're doing wrong is adding another vector3... You should only be giving it one vector3 value. Here.

player.Character:MoveTo(game.Workspace.End.Position)
0
I have read on the wiki that MoveTo also works on a humanoid. It worked, though BaconX112X 75 — 5y
Ad

Answer this question