Ad
Log in to vote
0

Created part floats to the camera Why?

Asked by 1 year ago
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?

2
Set the mouse.Target to be the part so the mouse ignores the part. mouse.TargetFilter = PartP royaltoe 5143 — 1y

1 answer

Log in to vote
2
Answered by 1 year ago
Edited 1 year ago

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

Ad

Answer this question