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

<SOLVED> How do I make this give me more money everytime I click?

Asked by 4 years ago
Edited 4 years ago

So, I made this script and when I click it it gives me +2 money, but when I click it again it doesn't how do I make it so it gives another +2 money when I click it again?

local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")


Tool.Equipped:Connect(function()
    print("It worked")
Tool.Activated:Connect(function()
    local Clicked = game.Players.BlueFlash2020.leaderstats.Money
    Clicked.Value = 2
    end)
end)




Also, I'm just a beginner scripter

0
You are settings the value to 2, not adding 2 to it. To do this, Clicked.Value = Clicked.Value + 2 killerbrenden 1537 — 4y
0
Thx so much this helped alot BlueFlash2020 5 — 4y
0
No problem! killerbrenden 1537 — 4y
0
Put <SOLVED> in the title to let others know that this question has been answered. Geobloxia 251 — 4y
View all comments (3 more)
0
ok BlueFlash2020 5 — 4y
0
I'm Trying to make a simulator game BlueFlash2020 5 — 4y
0
Try adding a cooldown if you want. Geobloxia 251 — 4y

Answer this question