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("Coins") if (score~=nil) then score.Value = score.Value + amnt end end end script.Parent:remove() end end ? script.Parent.Touched:connect(onTouched)
Closed as Not Constructive by User#24403 and EpicMetatableMoment
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?