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

My badge for my game is not appearing in the my models toolbox tab?

Asked by 6 years ago

I just made a badge for my game and I read a lot of help and they said it's in your, "My Models." When I check, it isn't there. Anyone have a script for an OnTouch give Badge?

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

a script like that would be awarding a badge when a player touched a part, so

is this what you want?

-- this should be parented in what you want players to touch to get it
local service = game:GetService("BadgeService")
local id = BadgeIdHere

script.Parent.Touched:connect(function(hit)
    if game.Players:GetPlayerFromCharacter(hit.Parent) then
        service:AwardBadge(game.Players:GetPlayerFromCharacter(hit.Parent), id)
    end
end)
Ad

Answer this question