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
 

What's wrong with this?

Previous Thread :: Next Thread 
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
11 Mar 2013 10:01 AM
I tried like a billion times, and I still can't get it to work. It's supposed to give the person a VIP sword if they have the T-shirt.

debounce = false
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
if debounce == false then
debounce = true
if game:GetService("BadgeService"):UserHasBadge(p.userId, 109226853) then
a = game.Lighting["VIP Sword"]:Clone()
a.Parent = player.Backpack
end
end
debounce = false
end)
end)



MUST. RUIN. CHILDHOOD.
Report Abuse
nickbricknick464 is not online. nickbricknick464
Joined: 22 Aug 2008
Total Posts: 8302
11 Mar 2013 10:06 AM
Any console output?
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
11 Mar 2013 10:08 AM
Nope.

MUST. RUIN. CHILDHOOD.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
11 Mar 2013 10:09 AM
Note that in play solo, player won't have any badges/t-shirts.
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
11 Mar 2013 10:10 AM
Yeah, it doesn't give me the sword when I go into play mode, either. I could test the script in Play mode if I could remember that model that tells you the output.

MUST. RUIN. CHILDHOOD.
Report Abuse
RadioactiveRadium is not online. RadioactiveRadium
Joined: 09 Mar 2013
Total Posts: 50
11 Mar 2013 10:10 AM
Please this isn't even set up for a t-shirt. It's setup for a badge. Here's my explanation I'm giving to you what to do.
Find the players t-shirt and compare assets of it.

~RR~
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
11 Mar 2013 10:12 AM
^
Dat guy has hurt his head, don't listen to him.
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
11 Mar 2013 10:16 AM
@Radioactive BadgeService works for everything, not just badges. I want it to work even if they're not wearing it.

MUST. RUIN. CHILDHOOD.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
11 Mar 2013 10:19 AM
Lemme try to do stuff:

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
if game:GetService("BadgeService"):UserHasBadge(player.UserId, 109226853) then
a = game.Lighting["VIP Sword"]:Clone()
a.Parent = player.Backpack
end
end)
end)
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
11 Mar 2013 10:20 AM
Durrrrr. I put p instead of player. How did I miss that until now?

MUST. RUIN. CHILDHOOD.
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
11 Mar 2013 10:24 AM
Dang it! Now when I get the sword, it doesn't work. Can I fix this? This happened when I created a GUI shop, too.

MUST. RUIN. CHILDHOOD.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
11 Mar 2013 10:34 AM
Idk, do what ever you want. Like disable and enable the script, or something. Think logically.
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