i have a script that grabs a part with the mouse and moves it to where the mouse is moving but i want to grab a whole model to move(Multiple parts) instead of just one, here is the script:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local billBoardGui = script.Parent
local imageButton = billBoardGui:WaitForChild(“ImageButton”)
local runService = game:GetService(“RunService”)
local isMoving = false
local movePart
local part = billBoardGui.Adornee
if not isMoving then isMoving = true
movePart = runService.RenderStepped:Connect(function()
mouse.TargetFilter = part
part.Position = mouse.Hit.Position
end)
else
movePart:Disconnect()
mouse.TargetFilter = nil
isMoving = false
end
USI = game:GetService(“UserInputService”)
USI.InputBegan:Connect(function(input)
if isMoving == true then
if input.UserInputType == Enum.UserInputType.MouseButton1 then
script:Destroy()
end
end
end)
I think you might’ve welded it wrong, you need to click the primary part first, and then the other parts. The way it is right now, it may be that the other parts cause your primary part to move, but the primary part can’t cause the other parts to move.
did that, it grabbed the whole thing but its moving a bit weird, the model is moving towards the invert direction that im looking and it rotated 90 degrees