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

Hoe can I make click button UI to get badge? [closed]

Asked by 3 years ago
Edited by JesseSong 3 years ago

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)


Closed as Not Constructive by marine5575 and JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 3 years ago
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)
Ad