Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Plugin repeating mouse issue?

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.

		repeat
			task.wait()
			mouseobjectc.Position = mouse.Hit.Position
		until mouse.Button1Down

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.

1 answer

✓ Accepted answer
mouse.TargetFilter=mouseobjectc
local tab={mouse.Move:Connect(function()
	mouseobjectc.Position = mouse.Hit.Position
end)}
tab[2]=mouse.Button1Down:Connect(function()
	for _,v in ipairs(tab)do
		v:Disconnect()
	end
end)
--mouse.Button1Down:Wait()

1 comment

0

i didnt even think of that thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.