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

Weapon GUI Badge access not working?

Asked by 10 years ago

I've been trying my best to make a GUI with weapon equip options. However, the weapons in the game must be found via Badge collection. So once the badge for the weapon is found, you should be able to click on the GUI button and equip it to your startergear, if it isn't found then the equip button should be disabled. I'm confident I'm just following the wrong guidelines to make it, any options for this?

01ID = 158694379
02badge = game:GetService("BadgeService")
03player = script.Parent.Parent.Parent.Parent.Parent
04 
05function find(userid, badgeid)
06if game:GetService("BadgeService"):UserHasBadge(userid, badgeid) then
07    clone = game.Lighting.GravityCoil:clone()
08    clone.Parent = player.StarterGear
09    end
10end
11 
12function MouseClick(hit)
13    if (hit.Parent:FindFirstChild("Humanoid") ~= nil) then
14        local p = game.Players:GetPlayerFromCharacter(hit.Parent)
15        if (p ~= nil) then
View all 23 lines...

Answer this question