how do you put a script to make a badge

Back
2001Error
Join Date:
Posts:
Jun 2023
2
5 months ago | 16 • By 2001Error

title basically says it all, i made a few badges in a game but have no idea how to script them in the game (its not just not knowing what to code for the badge, its how to even like.. make a script LMAO)


astronaut
Join Date:
Posts:
Dec 2020
368
5 months ago • By astronaut

I'm not really familiar with badges, but I assume you can do something like this, with the script inside of the badge giver part:


local badge = 12345 -- Badge ID
script.Parent.Touched:Connect(function(player)
if player:IsA("Player") then
Achievements:Award(player.UserID, badge)
end
end)