Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make the clicker for a simulator game without having to press a ui for points to be added?

Asked by 2 years ago

im trying to make a simulator game. i want the user to be able to click anywhere on the screen and get points. the only way I've found to do it is to make the button the whole screen but then you cant look around.

1 answer

Log in to vote
1
Answered by 2 years ago

try this

local userinputservice = game:GetService("UserInputService")

userinputservice.InputBegan:Connect(function(input, event)
    if event then return false end
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        -- your code here
    end
end)
0
where does this script go? Meerkatsrawesome 1 — 2y
Ad

Answer this question