"Unable to cast Vector3 to token" error

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I am trying to make a block placing system snap to other blocks
  2. What is the issue? Include screenshots / videos if possible!
    There is an error that says " Unable to cast Vector3 to token"
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    There is something wrong with this part:
--normal = (0, 1, -1)
--normal's type = Vector3
Vector3.FromNormalId(normal)

Does anyone know what “token” is and how to solve this error? Any help is appreciated :smiley:
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Vector3.new(normal, normal, normal)

Would be how to convert to a Vector3 value.

Wait, is this regarding “RaycastResult.Normal”? The value of that property is already a Vector3 value.

This is using a script that I made to find the normal (since the raycasting one did not work when I rotated it). Also, I made it into a “Vector3” but it somehow turned into a “EnumItem”.

I think this means that normal is a Vector3, not an EnumItem.

1 Like

Oops, you are right, it was an EnumItem in another script. I will change that :slightly_smiling_face: