Everything here works except line 8/9, where I gave my best shot at trying to find the userId of the player that I wanted to give it to. Any ideas how to give them the points?
Ex: In game I would say '/points cardboardrocks' and it would give cardboardrocks 1 PP (The bolded thing: :AwardPoints(b, **1**)
keyword = "/points"
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if string.find(msg:lower(), keyword) then
print("Found "..keyword)
a = msg:sub(8, msg:len())
print(a)
playerschildren = game.Players:GetChildren()
for i = 1, #playerschildren do
if playerschildren[i].Name == a then
b = playerschildren[i].userId
print(b)
end
end
game:GetService("PointsService"):AwardPoints(b, 1)
end
end)
end)

2 comments
Well I don't know how to do that, so once you tell me how then I can do it.
Done, i edit my answer, now see if works :P