Teleport Part Problem

i tried to teleport part position to mouse position when i hover on the target(part)
and i got confused because it teleports the part to 0,0,0 and i don’t know why if someone can help i will be happy

1 Like

I think the problem is the Vector3.new, mouse.Hit is already a CFrame. If you want the mouse position you can just say mouse.Hit.Position.

Here try this:

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local T = workspace.Mama


mouse.Move:Connect(function()
	if mouse.Target == T then 
		T.Position = mouse.Hit.Position
		print(mouse.Hit)
		print(T.Position)
	end
end)
2 Likes

i have another question how i can make it stop teleporting to my mouse position?

When do you want the part to stop teleporting to the mouse position? Or do you not want it to teleport to the mouse position at all?