This gives me 1 point when it is touched. When it is touched, how would I make it removed?
amnt = 1
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if (h~=nil) then
local thisplr = game.Players:findFirstChild(h.Parent.Name)
if (thisplr~=nil) then
local stats = thisplr:findFirstChild("leaderstats")
if (stats~=nil) then
local score = stats:findFirstChild("Points")
if (score~=nil) then
score.Value = score.Value + amnt
end
end
end
end
end
script.Parent.Touched:connect(onTouched)
script.Parent.Touched:Remove()

2 comments
Thanks!
No prob, glad I could help :p