I don't have much code set up, but to make it easier I want to detect if an object is clicked without any ClickDetectors.
✓ ANSWER ACCEPTED
How do I detect if an object is clicked without a click detector?
1 answer
✓ Accepted answer
There is a way to do this on the client side.
local player = game:GetService(“Players”).LocalPlayer
local mouse = player:GetMouse()
local clickableObject = workspace.Part
mouse.Button1Down:Connect(function()
if mouse.Target ~= nil and mouse.Target == clickableObject then
— Object has been clicked.
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Why do you not want a ClickDetector? It's easier to use them
Yes, but when there's a lot of parts in the game it might be easier to just use a script.