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

How do I award a Badge when I click on a brick???

Asked by 7 years ago

It's pretty self explanatory. How do you award a specific badge using the mouse click tool on a certain brick?

1 answer

Log in to vote
1
Answered by 7 years ago

This assumes the script is within a part with a ClickDetector inside said part.

1local BadgeService = game:GetService("BadgeService")
2local BadgeId = 00
3 
4script.Parent.ClickDetector.MouseClick:Connect(function(plr)
5    BadgeService:AwardBadge(plr.UserId,BadgeId)
6end)
Ad

Answer this question