so im making a plugin that decorates walls. like cuts holes in walls and such. i dont need csg help or something but i have a piece of code that doesnt work and just instantly stops.
1 | repeat |
2 | task.wait() |
3 | mouseobjectc.Position = mouse.Hit.Position |
4 | until mouse.Button 1 Down |
and it doesnt work. yes i have attempted to use variables but just didnt work. please help?
Edit: yes i know mouse.button1down isnt the right one but thats all i could think of.
01 | mouse.TargetFilter = mouseobjectc |
02 | local tab = { mouse.Move:Connect( function () |
03 | mouseobjectc.Position = mouse.Hit.Position |
04 | end ) } |
05 | tab [ 2 ] = mouse.Button 1 Down:Connect( function () |
06 | for _,v in ipairs (tab) do |
07 | v:Disconnect() |
08 | end |
09 | end ) |
10 | --mouse.Button1Down:Wait() |