So, I'm trying to make a tycoon game where I can place down objects wherever I want. I don't want the mouse to target the preview model, and how would I go about doing that? This is what I have so far, and the Target Filter I'm trying to use is in there.
while wait() do
mouse.TargetFilter = (prevmodel)
local filter = mouse.TargetFilter(prevmodel)
if mouse.Target ~= nil then
if mouse.Target.Parent.Name == "Model" then
else
prevmodel:MoveTo(Vector3.new((math.floor(mouse.hit.p.X) +offset),(math.floor(mouse.hit.p.Y) +offset),(math.floor(mouse.hit.p.Z) +offset)))
end
end
if script.TurnOff.Value == true then
prevmodel:Remove()
script.TurnOff.Value = false
script.Disabled = true
end
end
