Im new to coding, and i've wanted to make something easy like a clicker game. How do i exactly make a script, that detects player's clicks and rewards him with something. Every tutorial i've seen shows only how to make the clicking through a GUI button, but i cannot make a gui button work on every part of the screen. Can someone please help me?
#How to make a click detector
8 messages · Page 1 of 1 (latest)
You want the client to click and server to register it?
Yeah, and so it's not necessary to click on a limited area of button, but to click everywhere and still get registered clicks
then use a RemoteEvent
-- sending a signal (local script)
RemoteEvent:FireServer()
-- recieving a signal (server script)
RemoteEvent.OnServerEvent:Connect(function(player: Player)
-- do stuff with it here
end)
edit: it's OnServerEvent if you're sending from a client, not OnClientEvent :)
Thank you so much! Appreciate it 
no problem :D