Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Hoe can I make click button UI to get badge?

I had make a script but it does not work

local id = 2124650758
script.Parent.MouseButton1Click:Connect(function()

	
 print("Awarding BadgeID: " .. id .. " to UserID: " .. game.Players.LocalPlayer.userId .. "via. GUI")
	local b = game:GetService("BadgeService")
	b:AwardBadge(game.Players.LocalPlayer.userId, id)

script.Parent.Parent.Enabled = false
end)


1 answer

local id = 2124650758 script.Parent.MouseButton1Click:Connect(function()

print("Awarding BadgeID: " .. id .. " to UserID: " .. game.Players.LocalPlayer.userId .. "via. GUI") local b = game:GetService("BadgeService") b:AwardBadge(game.Players.LocalPlayer.userId, id)

script.Parent.Parent.Enabled = false end)

This discussion is preserved as it was. New answers, comments, and votes are closed.