generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: What's wrong with this script?

Previous Thread :: Next Thread 
fatdoggy100 is not online. fatdoggy100
Joined: 19 Aug 2008
Total Posts: 9043
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
fatdoggy100 is not online. fatdoggy100
Joined: 19 Aug 2008
Total Posts: 9043
10 Mar 2014 08:04 PM
??

hi
Report Abuse
fatdoggy100 is not online. fatdoggy100
Joined: 19 Aug 2008
Total Posts: 9043
10 Mar 2014 09:05 PM
??

hi
Report Abuse
fatdoggy100 is not online. fatdoggy100
Joined: 19 Aug 2008
Total Posts: 9043
10 Mar 2014 09:25 PM
??

hi
Report Abuse
fatdoggy100 is not online. fatdoggy100
Joined: 19 Aug 2008
Total Posts: 9043
11 Mar 2014 06:12 AM
???

hi
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
11 Mar 2014 06:13 AM
Hi
Report Abuse
fatdoggy100 is not online. fatdoggy100
Joined: 19 Aug 2008
Total Posts: 9043
11 Mar 2014 01:59 PM
That didn't help at all and was a pointless post.

hi
Report Abuse
fatdoggy100 is not online. fatdoggy100
Joined: 19 Aug 2008
Total Posts: 9043
11 Mar 2014 09:43 PM
Anyone?
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
11 Mar 2014 09:51 PM
output?
Report Abuse
janthran is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image