So when I join my game, and touch a block it changes my leaderstats called "Level". But when I test it out with multiple people, and I touch the block. It changes all the people leaderstats to given value. How can I fix this?
game.Players.PlayerAdded:Connect(function(player)
local debounce = true
script.Parent.Touched:Connect(function()
local plrstats = player.leaderstats.Level
if debounce then
debounce = false
plrstats.Value = 1
wait (1)
debounce = true
end
end)
end)

2 comments
You are creating a .Touched event everytime a player joins, and plus you didn't specify which player touch the brick, so 1 player touch the brick, everyone's leaderstats will be changed
so how would I fix this?