#Click on screen add 1
18 messages · Page 1 of 1 (latest)
Create a Text/Image Button and a script
Make the Button as you want and start working on the script
You can use MouseButtton1Click even to run a function when the player press the button
Assuming you already have a data script, you can change the value of cash (money) by clicking on the button and adding 1 to the value
Here is an example:
local plr = script.Parent.Parent.Parent.Parent
--First we get the player
script.Parent.MouseButton1Click:Connect(function()
--When player click the button, it will run the function
plr.leaderstats.Money.Value += 1
--Player's Money got changed
end)
If you have any question you can ask
Is there a way to do it without a button?
"click on the screen"
Well you could use UserInputServer when you press left click, but for that you would need a local script and a remote event to fire the server and thats just a headache for something you could do with a button
👍🏿
So I should do it with a button, i thought it was pretty easy because I saw it in many clicker games
Using a button is the easiest way to do it
👍

