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

How am I suppose to complete my Player Point per kill script?

Asked by
5SKD 0
6 years ago

I am making a game where I want a player to get awarded a player point when they kill another player. Please tell me where I went wrong

local PointsService = game:GetService("PointsService")

function awardPoints(creator)
    if time() - lastAwardedTime < 5 then 
            return
    else
        lastAwardedTime = time()
        PointsService:AwardPoints(creator.Value, 1)
    end
end

Also, I don't know where to put the script. Would I create a local script and leave it in workspace or am I suppose to put a regular script inside my weapon?

Answer this question