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

Created part floats to the camera Why?

local function Draw()
	while wait() do
    if LeftDown then
      local PartP = Instance.new("Part",trash)
		PartP.CanCollide = false
				PartP.Size = Vector3.new(1,1,1)
		PartP.Material = Enum.Material.Neon
		PartP.Anchored = true
	PartP.Position = mouse.Hit.p
    end
end 

I am using Mouse.Hit.p and whenever I create a part it floats to my camera. Solution?

1 comment

2

Set the mouse.Target to be the part so the mouse ignores the part. mouse.TargetFilter = PartP

1 answer

✓ Accepted answer

Because you aimed at the part, so the new mouse.hit.p would be the surface of the part, it keeps getting the surface of the part thats why it fly towards you

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