|
| 20 Feb 2015 09:42 PM |
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local plr = hit.Parent plr.leaderstats.Wins.Value = plr.leaderstats.Wins.Value + 1 end end)
whenever u touch u are supposed to get +1 wins..
The output says: 21:40:47.830 - leaderstats is not a valid member of Model |
|
|
| Report Abuse |
|
|
|
| 20 Feb 2015 09:44 PM |
leaderstats is in the Player object in the Players service, not the model character.
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if not plr then return end plr.leaderstats.Wins.Value = plr.leaderstats.Wins.Value + 1 end end) |
|
|
| Report Abuse |
|
|
|
| 20 Feb 2015 09:45 PM |
Gah, I feel stupid, I did this earlier today.
Thanks! |
|
|
| Report Abuse |
|
|