I can't Use mouse as an argument?
So I'm trying to make a script where you click on any brick in the game and a GUI box pops up. I successfully made an importer script that puts this script in PlayerScripts for every player that joins the game, but now I'm having trouble actually making this script work. Again, the goal of this script is when a player right-clicks on any brick in the game a GUI box pops up on their screen. Am I not supposed to use mouse as an argument for onButton2Down()? I tried (part) as well but that didn't work either. The script seems like it would work except in the connection line at the bottom it isn't recognizing mouse. How can I fix this?
01 | local SCREENGUI = script.ScreenGui |
02 | local FRAME = SCREENGUI.Frame |
04 | function onButton 2 Down(mouse) |
05 | local targ = mouse.Target |
12 | mouse.Button 2 Down:connect(onButton 2 Down) |