Explaination: How to you make a block that adds a win to the leaderboard on touch. I also need it to save. Also, how do you make the leaderboard?
COMMUNITY QUESTION
How do you make a block that gives wins on touch?
1 answer
Please dont ask for requests in the future but this is how to add wins on touch: (put inside the part) (also make a wins leaderboard)
script.Parent.Touched:Connect(function(hit)
local man = hit.Parent:FindFirstChild("Humanoid")
if man ~= nil then
local char = game.Players:GetPlayerFromCharacter(hit.Parent)
char.leaderstats.Wins.Value = 10
end
end)
1 comment
0
Why is it set to 10 and not added?
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
This isn't a request site, but what you can do for the leaderboard is read this article: https://developer.roblox.com/en-us/recipes/How-to-create-a-leaderboard
I thought this was scripting help?
@Barnabasbo0p you should attempt it on your own first, if you don't know where to start then you should watch some tutorials about coding first.