so I am making an easy placing system, it works but there is issue. the TargetFilter not filtering the object and twitching like this
robloxapp-20200711-1718079.wmv (560.1 KB)
this is my script
local grid = game.Workspace.grid:GetChildren()
for i, v in pairs(grid) do
v.ClickDetector.MouseHoverEnter:Connect(function()
local b = script.Parent.Handle:Clone()
b.Parent = workspace
game.Players.LocalPlayer:GetMouse().TargetFilter = b
b.Transparency = 0
b.CanCollide = false
b.Anchored = true
b.Color = Color3.fromRGB(0,255,0)
b.Position = v.Position + Vector3.new(0,(v.Size.Y/2 +b.Size.Y/2),0)
v.ClickDetector.MouseHoverLeave:Connect(function()
b:Destroy()
end)
end)
end