I'm trying to make a button that gives you clicks when you click it. I have a Text Label to show how many clicks I have
This is a LocalScript:
local button = script.Parent -- Button that is clicked
button.MouseButton1Click:Connect(function()
local number = game.StarterGui.ScreenGui.Number -- textlabel (the text is a number)
local value = game.Players.LocalPlayer.Clicks.Clicks -- intvalue
value.Value = value.Value + 1
number.Text = (value.Value)
end)
The Scripts works, but the text label won't update when the name changes. This is probably because im doing this with a text label or that im changing the name instead of making a leaderstat, but if you have any answers please help.

1 comment
Thanks!