✓ Accepted answer
Define your services.
Define your badge id
Define a debounce so the function doesnt run your code 100 times at once.
Award the badge if they are found in the players service
http://wiki.roblox.com/index.php?title=API:Class/BadgeService/AwardBadge
Vague answer because i'm tired sorry. ):
local badgeService = game:GetService("BadgeService")
local players = game:GetService("Players")
local badgeId = 12345678
local canTouch = true
local function checkTouch(touch)
if canTouch then
canTouch = false
local possiblePlayer = players:FindFirstChild(touch.Parent.Name)
if possiblePlayer then
badgeService:AwardBadge(possiblePlayer.UserId, badgeId)
end
wait(1)
canTouch = true
end
end
script.Parent.Touched:Connect(checkTouch)
7 comments
Wait maybe?
Its been 6 hours ;-;
Use BadgeService, I find this service to be easy: http://wiki.roblox.com/index.php?title=API:Class/BadgeService
I would, but I really don't have much of an idea of how to script and I need either a copy paste script or instructions because I barely know scripting... Thanks for the suggestion though
I've been searching the web for quite a few hours and I can't find anything about how to make badge giver yourself without using my models, and the ones I found I didn't understand.
Badge givers aren't the only way to get badges. They are just the old way of giving out badges.
I know that, I just want something like a badge giver, basically a "Touch said Part to get badge" etc so that when you reach a certain easter egg in my game, you receive said badge. The problem is I don't understand how to make this. I would love if somebody could give me some form of instructions because I'm totally lost here