It is supposed to add a point to the leaderstats everytime it gets clicked Hierarchy: https://gyazo.com/67616593038e127a56fb83fd48698230 script:
script.Parent.MouseButton1Down:Connect(function(player)
player.leaderstats.Points.Value = player.leaderstats.Points.Value + 1
end)
and for the main one (in workspace)
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local Value = Instance.new("IntValue")
Value.Name = " Won: "
Value.Parent = leaderstats
Value.Value = 0
end)
Two different scripts used here btw.

5 comments
GuiButton.MouseButton1Down does not return player.
Also why are you using regular scripts inside of a screen gui?
DevKing (from the video I saw) used a "ClickDectector" while you're using a "TextButton". The reason your script doesn't work is because the Server can't detect when a Client has clicked any buttons, except for ClickDetectors. The way you should go at giving the player points is putting the first script into a LocalScript and connecting it with a RemoteEvent, then adding onto the points.
Link me to the tutorial you're using, there might be a lot more going wrong than you have shown here.
I would recommend watching the whole video, then trying this out!