So, I am trying to make a teleporter to a certain block. I feel like this is right, but the error message "Unable to cast Instance to Vector3" keeps appearing. Here is my script.
1 | local Part = script.Parent |
2 | local Location = script.Parent.Parent.Reciever |
3 | Part.Touched:connect( function (hit) |
4 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
5 | local Character = hit.Parent |
6 | Character:MoveTo(Location) |
7 | end |
8 | end ) |
1 | local Location = script.Parent.Parent.Reciever.Position |
Well um, I'm pretty sure MoveTo() needs a Vector3 point, so just add .Position to your location variable. I hope this works.