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: badge script

Previous Thread :: Next Thread 
helpsyouattime is not online. helpsyouattime
Joined: 24 Jun 2011
Total Posts: 345
03 May 2012 05:36 PM
i got a script that is not working,it is one of my freinds.he has a badge but he wants it to give it when he is there,its the "you met the owner of this game"

first script:
badgeId= 79278655 --Change The Badge ID To The Value Of A IntValue That Is In The Badge Model--

function onPlayerEntered(player)
if string.lower(player.Name)==string.lower("ScaryTeddy11") then
for _,a in pairs(game.Players:GetChildren()) do
if a.Name~="ScaryTeddy11" then --Change "ScaryTeddy11" To Your Name--
game:GetService("BadgeService"):AwardBadge(a.userId,badgeId)
end
end
end
if game.Players:findFirstChild("ScaryTeddy11")~=nil then --Again Change "ScaryTeddy11" To Your Name--
game:GetService("BadgeService"):AwardBadge(player.userId,badgeId)
end
end
game.Players.ChildAdded:connect(onPlayerEntered)


now here is the script i edited

badgeId= 79278655 --Change The Badge ID To The Value Of A IntValue That Is In The Badge Model--
game.Players.ChildAdded:connect(onPlayerEntered)
function onPlayerEntered(player)
if string.lower(player.Name)==string.lower("ScaryTeddy11") then
for _,a in pairs(game.Players:GetChildren()) do
if a.Name~="ScaryTeddy11" then --Change "ScaryTeddy11" To Your Name--
game:GetService("BadgeService"):AwardBadge(a.userId,badgeId)
end
end
end
if game.Players:findFirstChild("ScaryTeddy11")~=nil then --Again Change "ScaryTeddy11" To Your Name--
game:GetService("BadgeService"):AwardBadge(player.userId,badgeId)
end
end

Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
03 May 2012 05:53 PM
end) -- woop.
Report Abuse
helpsyouattime is not online. helpsyouattime
Joined: 24 Jun 2011
Total Posts: 345
03 May 2012 07:38 PM
well if your not gonna help me.then dont even bother replying.its just a waste of time.and ya.
Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
03 May 2012 07:45 PM
I told you what to do, If you actually wrote this script, you'd know exactly what I was talking about.
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
03 May 2012 07:46 PM
Ozza was helping, but I don't think he was correct with it. Try moving the connection line to the bottom; I know having it at the top breaks programs in C++, but I'm not so sure about RBX.Lua. Anyway, try it and it may help.

badgeId= 79278655 --Change The Badge ID To The Value Of A IntValue That Is In The Badge Model--
function onPlayerEntered(player)
if string.lower(player.Name)==string.lower("ScaryTeddy11") then
for _,a in pairs(game.Players:GetChildren()) do
if a.Name~="ScaryTeddy11" then --Change "ScaryTeddy11" To Your Name--
game:GetService("BadgeService"):AwardBadge(a.userId,badgeId)
end
end
end
if game.Players:findFirstChild("ScaryTeddy11")~=nil then --Again Change "ScaryTeddy11" To Your Name--
game:GetService("BadgeService"):AwardBadge(player.userId,badgeId)
end
end
game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
helpsyouattime is not online. helpsyouattime
Joined: 24 Jun 2011
Total Posts: 345
03 May 2012 08:17 PM
oh,sorry about that then,i was kind of confused,ill go test it out!
Report Abuse
helpsyouattime is not online. helpsyouattime
Joined: 24 Jun 2011
Total Posts: 345
03 May 2012 08:24 PM
do i just put it in a s ascript or what?
or do i put it the badge awarder and remove the script that is in it amd add another script and then put the fixed script in or what do i do
Report Abuse
Jerry0517 is not online. Jerry0517
Joined: 06 Sep 2010
Total Posts: 10
03 May 2012 08:35 PM
Now I think you're just confusing yourself. Just edit the script. Don't delete, then re-enter, then delete, then re-enter... Just do what he said. (Up a few)
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
03 May 2012 09:00 PM
Add spaces after your punctuation.
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