I have a Part with a BodyPosition inside. I want the BodyPosition's position property (Which is Vector3) to be where my mouse is pointing (mouse.Hit, Which is CFrame).
This is what I have right now:
local mouse = game.Players.LocalPlayer:GetMouse() wait(10) game.Workspace.Part.BodyPosition.position = Vector3.new(mouse.Hit)
Every time though after 10 seconds of randomly moving my mouse, the position property still reads 0,0,0 every time (Meaning it has not changed).
There is no output.
How can I make it so the position property is where my mouse is?
NOTE: This is inside a LocalScript and FilteringEnabled is NOT on.
There is a simple way, there is sometimes a .p property of CFrame values. For example:
local mouse = game.Players.LocalPlayer:GetMouse() mouse.Hit.p -- <-- That is now a Vector3 game.Workspace.Part.CFrame.p -- <-- also now a Vector3
Hope it helped
Simply wrap it up with a nice Vector3.new()
Vector3.new(CFrame.new(5,1,5))