I've been trying to do this code:
local newPosition = Mouse.Target
but I get some error about it being an object and not a Vector3 when I assign it to things like
part = newPosition
.
Any solutions?
Mouse.Target is the object in 3D space the mouse is pointing to.
For example, if the mouse rests on a brick, the target would be the name of the brick.
print(mouse.Target)
Output: Part
If you want to use the position of the mouse, try mouse.Hit.Position
.
local newPosition = mouse.Hit.Position part.Position = newPosition
Cheers.