Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make it so the part/Button counts how many times its been clicked?

1 answer

✓ Accepted answer

OP, I think the problem you have is the unnessacary use of "local"

Try this in the first script:

script.Parent.ClickDetector.MouseClick:Connect(function(player)
    local PlayerBPs = player.leaderstats.BP
    script.Parent.Text = (PlayerBPs.Value + 1)
end)

I removed the unneeded Locals

Basically, only use Local if you are initiating a varible or function

1 comment

0

thanks, welp that fixed it!

This discussion is preserved as it was. New answers, comments, and votes are closed.