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: Need some help..

Previous Thread :: Next Thread 
skill24 is not online. skill24
Joined: 14 Jun 2009
Total Posts: 13608
06 Jul 2013 11:17 AM
k so i made a badge for my tycoon
now
how do i make it so you are awarded it when you buy a certain item at the tycoon?
Anyone?
Please reply
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Jul 2013 11:18 AM
Game:GetService("BadgeService"):AwardBadge(PLAYER.UserId, BADGEID)
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
06 Jul 2013 11:19 AM
Inside of the script that lets you purchase the item just use BadgeService to award the players user id with the badges id.
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
06 Jul 2013 11:19 AM
Find button where you buy item, it probably has a script with a function called something like ontouched. Somewhere in that script probably after an if statement that says if plyr has enough money or something like that, put the give badge script
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
06 Jul 2013 11:20 AM
Does UserId work? I've always used userId, but I'd prefer UserId
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Jul 2013 11:22 AM
Ah, no you're right. Habit to capitalize.

Game:GetService("BadgeService"):AwardBadge(PLAYER.userId, BADGEID)
Report Abuse
skill24 is not online. skill24
Joined: 14 Jun 2009
Total Posts: 13608
06 Jul 2013 11:25 AM
Still don't understand
D:
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Jul 2013 11:25 AM
That is the method to award a badge. I have no idea how your shop works, so I don't know what else to include.
Report Abuse
skill24 is not online. skill24
Joined: 14 Jun 2009
Total Posts: 13608
06 Jul 2013 11:50 AM
Do you cpy and paste this into the brick you touch to buy the item?
Game:GetService("BadgeService"):AwardBadge(PLAYER.userId, BADGEID)
Report Abuse
woot3 is not online. woot3
Joined: 10 Nov 2008
Total Posts: 3599
06 Jul 2013 11:56 AM
local badgeId = ID OF BADGE

script.Parent.Touched:connect(function (hit)
if hit.Parent and game.Players:FindFirstChild(hit.Parent.Name) then
game:GetService("BadgeService"):AwardBadge(game.Players[hit.Parent.Name.userId], badgeId)
end
end)
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