How can I detect what is clicked by user’s mouse without needing to use a click detector
This is how you get the instance that the player mouse is pointing at (part, meshpart, union)
local MouseTarget = game.Players.LocalPlayer:GetMouse().Target
The overall setup will depend on whether or not you want the Server detecting the input, or just the client.
Regardless of which one you want, the client should be set up so that it uses UserInputService to detect when the player clicks their mouse. Upon clicking, determine the part the mouse is hovering over, through Mouse.Target. You can get the mouse as seen above with @Dolphin_Worm’s response, using the GetMouse() function of Player . Once you determine the part, use an if statement to decide whether or not the part is correct or not.
If the client is all you need it on, run the functions or whatever inside the if statement. However, if you want this to be sent to the server, you will need to set up a RemoteEvent.
Within the final if statement (checking whether the part is correct or not), fire a RemoteEvent instance. On a server side script, be checking for the event through the OnServerEvent event of RemoteEvents. Finally, run the code you desire on the server.