Trying to get a print that this pretty simple line of code is functional, no response from the output.
1 | local player = game.Players.LocalPlayer |
2 | local Block = script.Parent |
3 |
4 | Block.ClickDetector.MouseClick:Connect( function () |
5 | print ( "Success: Click has been detected!" ) --Testing that the function works. |
6 | end ) |
Try this:
Must be a Normal (Not Local) Script!!!
1 | -- local player = game.Players.LocalPlayer This won't work in a normal script! |
2 | local Block = script.Parent |
3 |
4 | Block.ClickDetector.MouseClick:Connect( function (player) -- the above non-functioning player line is substituted with this |
5 | print ( "Success: Click has been detected by player[" ,player, "]!!" ) --Testing that the function works. |
6 | end ) |
Hope this helps!