I've looked online for this and found some things, but not what I wanted. I found scripts to make a brick draggable, but u could also drag everything else. I've been scripting for over a year but im still not advanced enough to do this. If you could explain it on simple terms or show me how I would do this please help lol (Also I dont want a tool to have to be used)
How do I make a Draggable Brick?
1 answer
heres the edited answer; u may notice that it was only a slight edit
local mouse = game.Players.LocalPlayer:GetMouse()
local mousetarget
local grabbing = false
mouse.Button1Down:connect(function()
mousetarget = mouse.Target
local purchase = mousetarget:FindFirstChild("Purchase")
if purchase ~= nil and purchase.Value == true then
mouse.TargetFilter = mousetarget
grabbing = true
end
end)
mouse.Move:connect(function()
if grabbing == true then
mousetarget.Position = mouse.Hit.p
end
end)
mouse.Button1Up:connect(function()
grabbing = false
mouse.TargetFilter = nil
end)
16 comments
it uses the mouse targefilter tho if thats ok
the targetfilter should be fine
also, wouldn't a renderstepped event also work?
and there is a couple of minor convention errors, for one, mouse.Hit.p should now be mouse.Hit.Position and connect was deprecated in favor of Connect
Where would I put the script? And do I need to make any strings of anything?
oof
lol
nothing complicated starterpack should be fine
Its not letting me drag stuff, does it need to be name something? click detector? I made it a local script in the starterpack
well ye u gotta define the mousetarget of the scriptn to the part u want sry for tha late reply btw had t5o run an errand
oof thats a lot of typos
Omg thx so much it works
np
I tampered with the script but couldn't get it to work, how would I make every part that has a bool value in it named Purchase set to true be draggable? lol sorry for bugging u so much
oof i thought i was done so i didnt check sry
ok ill edit the above existing one
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
if you looked for something could you post it?
I only found https://www.youtube.com/watch?v=HW8K6FblwvI and I found a forum post earlier on how to do it with a tool