Point Award Script & Check for sitting script - Do not work ??
02 | local pointgiver = script.Parent |
03 | pointgiver.Touched:connect( function (pointgiver) |
06 | local g = game.Players:GetPlayerFromCharacter(pointgiver.Parent) |
07 | if pointgiver:IsA( "Part" ) and (g) then |
08 | pps = game:GetService( "PointsService" ) |
09 | if pps:GetAwardablePoints() > = 1 then |
10 | local plr = pointgiver.Parent:findFirstChild( "Humanoid" ) |
11 | if plr.Health = = 100 then |
13 | pps:AwardPoints(g.userId, 10 ) |
------ The above script breaks after hitting it a few times, when I'm testing it on wait(1), I need some ways of fixing it, and I can't figure those myself...
02 | function onTouched(hit) |
03 | if not enabled then return end |
05 | local h = hit.Parent:findFirstChild( "Humanoid" ) |
11 | script.Parent.Touched:connect(onTouched) |
---------- The above script also seems to break after testing it.. This might have an issue with debounce, which probably requires a wait(), but are there any other issues with this?