you can’t assign Position To CFrame
you should assign the spiritbomb CFrame to CFrame.lookAt(spiritbomb.CFrame.Position, pos) spiritbomb.CFrame = CFrame.lookAt(spiritbomb.CFrame.Position, pos)
It’s stated that it is equivalent to mouse.Hit.Position, besides the error literally states that you’re trying to assign the wrong type of value to a property.
It would say something like Invalid argument #2 Vector3 expected, got CFrame if the pos variable was a CFrame.
Makes sense, but he might have mistaken with Mouse.Target instead of Mouse.Hit, that’s what I was wondering. (edit: nevermind, I’m blind, there is a comment saying what pos is)
The constructor method is used for cases where you need to set the cframe at a certain position, but if you just want to read what position it’s currently placed at, you can just use CFrame.Position
This worked, thank you! My brain turned off and completely forgot. Anyways, how would I make the part move towards the mouse? I’m changing the position using Vector3.new() but it doesn’t move towards the mouse instead towards it’s moving only forward.
@ayoub50 wouldn’t that just set the position of the part to the players mouse? I want it to move/glide towards it. (now that I think of it, I probably could’ve used a tween and not use look vectors or anything,.)