function addxp(hit)
local dude = hit.Parent:WaitForChild('Character')
dude.xp.Value = 1
script.Parent:Destroy()
end
script.Parent.Touched:connect(addxp) -- the script's parent is a brick
Im 90% sure this should work, but when i touch the brick absolutely nothing happens. I checked the values after too, it remains at 0. Anything I did wrong?

2 comments
Worked perfectly, thanks! You're a very helpful member.
Glad to help!