Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Created part floats to the camera Why?

Asked by 4 years 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 5144 — 4y

1 answer

Log in to vote
2
Answered by 4 years ago
Edited 4 years 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