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: Can you help me find the problem in this script

Previous Thread :: Next Thread 
telaluchiha1 is not online. telaluchiha1
Joined: 28 Dec 2008
Total Posts: 3344
10 Apr 2012 10:32 AM
function onPlayerEntered(newPlayer)
repeat wait() until newPlayer.Character
repeat wait() until newPlayer.Character:FindFirstChild("ShirtGraphic")
if newPlayer.Character.ShirtGraphic ~= nil then
if newPlayer.Character.ShirtGraphic.Graphic == "77143077" then
local b = game:GetService("BadgeService")
b:AwardBadge(newPlayer.userId, 76979639)
local tool1 = game.Lighting:FindFirstChild("Cheezburger"):clone() --Change to First Tool Name
tool1.Parent = newPlayer.Backpack
local tool1c = game.Lighting:FindFirstChild("Cheezburger"):clone() --Repeat Above
tool1c.Parent = newPlayer.StarterGear
local tool2 = game.Lighting:FindFirstChild("Cola"):clone() --Change to Second Tool Name
tool2.Parent = newPlayer.Backpack
local tool2c = game.Lighting:FindFirstChild("Cola"):clone() --Repeat Above
tool2c = newPlayer.StarterGear
local tool3 = game.Lighting:FindFirstChild("Cake"):clone() --Change to Third Tool Name
tool3.Parent = newPlayer.Backpack
local tool3c = game.Lighting:FindFirstChild("Cake"):clone() --Repeat Above
tool3c.Parent = newPlayer.StarterGear
local tool4 = game.Lighting:FindFirstChild("NoiseMaker1"):clone() --Change to Fourth Tool Name
tool4.Parent = newPlayer.Backpack
local tool4c = game.Lighting:FindFirstChild("NoiseMaker1"):clone() --Repeat Above
tool4c.Parent = newPlayer.StarterGear
end
end
end



game.Players.ChildAdded:connect(onPlayerEntered)




for some reason people dont get badge or items
Report Abuse
Quovis is not online. Quovis
Joined: 24 Mar 2012
Total Posts: 494
10 Apr 2012 10:34 AM
game.Players.PlayerAdded:connect(function(newPlayer)
repeat wait() until newPlayer.Character
repeat wait() until newPlayer.Character:FindFirstChild("ShirtGraphic")
if (newPlayer.Character.ShirtGraphic ~= nil) then
if (newPlayer.Character.ShirtGraphic.Graphic == "77143077") then
local b = game:GetService("BadgeService")
b:AwardBadge(newPlayer.userId, 76979639)
local tool1 = game.Lighting:FindFirstChild("Cheezburger"):clone() --Change to First Tool Name
tool1.Parent = newPlayer.Backpack
local tool1c = game.Lighting:FindFirstChild("Cheezburger"):clone() --Repeat Above
tool1c.Parent = newPlayer.StarterGear
local tool2 = game.Lighting:FindFirstChild("Cola"):clone() --Change to Second Tool Name
tool2.Parent = newPlayer.Backpack
local tool2c = game.Lighting:FindFirstChild("Cola"):clone() --Repeat Above
tool2c = newPlayer.StarterGear
local tool3 = game.Lighting:FindFirstChild("Cake"):clone() --Change to Third Tool Name
tool3.Parent = newPlayer.Backpack
local tool3c = game.Lighting:FindFirstChild("Cake"):clone() --Repeat Above
tool3c.Parent = newPlayer.StarterGear
local tool4 = game.Lighting:FindFirstChild("NoiseMaker1"):clone() --Change to Fourth Tool Name
tool4.Parent = newPlayer.Backpack
local tool4c = game.Lighting:FindFirstChild("NoiseMaker1"):clone() --Repeat Above
tool4c.Parent = newPlayer.StarterGear
end
end
end)



Not sure, try that.
Report Abuse
3lex33 is not online. 3lex33
Joined: 08 Oct 2008
Total Posts: 5220
10 Apr 2012 11:03 AM
If output dont show anything at all, either new player characters dont have "ShirtGraphic", either the id is wong, either function is not being started. Try putting prints with something after each condition/repeat loop.

By the way, why do you check if shirt graphic is nil, if script wont advanse until shirt graphic is not nil?
Report Abuse
telaluchiha1 is not online. telaluchiha1
Joined: 28 Dec 2008
Total Posts: 3344
10 Apr 2012 11:39 AM
still broken :/


......
Do i need to put the full link for the T-Shirt Asset?
Report Abuse
telaluchiha1 is not online. telaluchiha1
Joined: 28 Dec 2008
Total Posts: 3344
10 Apr 2012 12:37 PM
Please!
Report Abuse
3lex33 is not online. 3lex33
Joined: 08 Oct 2008
Total Posts: 5220
10 Apr 2012 12:51 PM
Did you put prints after each conditions and look at the results?
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