What I want is when the brick is touched to increase the value XP in my leaderstats. Script in brick:
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
game.Players.LocalPlayer.leaderstat.Name ("XP").Status.Value + 5
end
end
script.Parent.Touched:connect(onTouch)

5 comments
Are we basically friends now?
This does not work, if the part is touched it will add 5 to all the player's leaderstats instead of only the player who touched it. You also used WaitForChild incorrectly and forgot a "then" on an if statement.
maybe robloxhighschool xD
**I EDITED IT GUYS. SHOULD BE WORKING NOW.
Sorry but it actually does not work. Thanks for trying though! :)