|
| 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
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 726 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 03 May 2012 08:17 PM |
| oh,sorry about that then,i was kind of confused,ill go test it out! |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 03 May 2012 09:00 PM |
| Add spaces after your punctuation. |
|
|
| Report Abuse |
|
|