so i have a fully working script, however it only works for one person, whose username has to be put in:
newCube.Touched:Connect(function(touched)
local humanoid = touched.Parent:FindFirstChild("Humanoid")
if humanoid then
game.Players.Averpyxl.leaderstats.money.Value = game.Players.Averpyxl.leaderstats.money.Value + value
newCube:Destroy()
end
end)```
this is the code, i dont know how to make it for all players in the server, i currently just used my username for it and it works but if anyone knows how i can fix it, please help me.