I have a move tool I created where I can move drag around bricks that are in a model. It works okay if I click and hold and drag the objects around. However, if I just click once on a part of the brick that is in a model, that brick gets moved and the other one does not...any ideas?
Here is my code
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local moveEvent = nil --We need to store the event so we may disconnect when left-click is released mouse.Button1Down:connect(function() local target = mouse.Target if target and target.Parent.Name == "Furniture" then target.Parent.PrimaryPart = target mouse.TargetFilter = target moveEvent = mouse.Move:connect(function() if (player.Character.UpperTorso.Position - mouse.TargetFilter.Position).magnitude <= 35 then target.Parent:SetPrimaryPartCFrame(CFrame.new((mouse.Hit.p))) else moveEvent:disconnect() end end) end end)
Hm, your script looks fine.
What you can try doing is not setting the model's PrimaryPart to the mouse's target before hand, and just use a preset primary part, although this shouldn't make a difference. If you don't want your model to be anchored, try welding all the parts together with a weld script such as Quenty's qPerfectionWeld, or else make sure they're all anchored.