Changing value by clicking

(I know that I shouldn’t ask for scripts but this is such a small problem so I thought it would be okay)

I just want to know how to change a value or print a text by just click with no tool or anything. So just a click in the air.

I’ve looked around but I don’t find how I’m supposed to do it.

You can use the good o’ UIS or User Input Service!

You can call the UIS by starting the script by doing
(Idk how to do the fancy code looking text sorry)

UIS = game:GetService(“UserInputService”)

UIS.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
—Do stuff after the left button is pressed.
end

end)

You can look more into it in the Wiki

1 Like