|
| 10 Mar 2014 07:50 PM |
So there's buttons, and when you click on them it gives you the Clothes ID it has in it, and it works in one version, but now I want it so only if you have a certain game pass it will give you the clothes, but it's not working.
local plr=script.Parent.Parent.Parent repeat wait() until plr local char=plr.Character repeat wait() until char local buttons=script.Parent.ClothingButtons local gp=game:GetService("GamePassService") local gpid=140946346 local wear =
function(button) print(gp:PlayerHasPass(plr,pass)) if gp:PlayerHasPass(plr,pass) then local type=button.Clothes.ClassName for k,v in pairs(char:GetChildren()) do if v.ClassName==type then v:Destroy() end end button.Clothes:Clone().Parent=char end end
for k,b in pairs(buttons:GetChildren()) do print[[click]] b.MouseButton1Click:connect(function() wear(b) end) end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
|
| 11 Mar 2014 01:59 PM |
That didn't help at all and was a pointless post.
hi |
|
|
| Report Abuse |
|
|
| |
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
| |
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 12 Mar 2014 11:28 AM |
| 'pass' is undefined. You need to change gpid to pass before it'll even come close to working. |
|
|
| Report Abuse |
|
|