Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What's the problem in this line? CFrame is userdata?!

oorb.CFrame = oorb.CFrame * (game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 2) This is the line I use to rotate a brick. The error is seen here: linkyyy

1 answer

What a userdata is -- CFrame is a ROBLOX type, so it is userdata.

So are Vector3s, which is the cause of the error and the difficulty with diagnosing type problems with them.

You cannot multiply a CFrame and a Vector3, but that is what you are doing here (lookVector is a Vector3 and not a CFrame).

This discussion is preserved as it was. New answers, comments, and votes are closed.