Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Am I checking for the badge correctly?

Asked by 10 years ago
01local pointgiver = script.Parent --change part to name the name of the part
02local BadgeId = 167370291
03 
04pointgiver.Touched:connect(function(pointgiver)--change part to the name of the part
05local g = game.Players:GetPlayerFromCharacter(pointgiver.Parent)
06        if game:GetService("BadgeService"):UserHasBadge(g.userId, BadgeId) then
07        print'Has badge'
08            elseif pointgiver:IsA("Part") and (g) then --Makes sure the part is a part
09            pps = game:GetService("PointsService")--Declares the point service
10                if pps:GetAwardablePoints() >= 50 then --change 1 to how much points you get for touching the part
11                pps:AwardPoints(g.userId, 50) --doesent matter
12                print'pts awarded'
13                end
14        end
15end)

Should this be functioning correctly?

It doesn't seem to be :/

0
Change one of the 'pointgiver' variables. Shawnyg 4330 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

I don't see anything wrong I'll check on it a little more though.

Ad

Answer this question