I wanted to know how you could run something with the button feature. Not
function onTouch(part)
end
example.Touched:connect(onTouched)
But actually making it so you can use your mouse to click it.
I wanted to know how you could run something with the button feature. Not
function onTouch(part)
end
example.Touched:connect(onTouched)
But actually making it so you can use your mouse to click it.
To do this simple insert a click detector into a part and write the following
script.Parent.ClickDetector.MouseClick:connect(function(player)
--Code here
end)
Next time, try including
function onClick() --Instead of onTouch
--CODE HERE--
end
script.Parent.ClickDetector.MouseClick:connect(onClick) --Where it says Parent.ClickDetector, make it so it is wherever your clickdetector is
This discussion is preserved as it was. New answers, comments, and votes are closed.