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: Get weapons when you spawn?

Previous Thread :: Next Thread 
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 08:39 AM
Not like a starterpack, it's supposed to give you a weapon when you wear the face "Chill".

game.Players.PlayerAdded:connect(function(player)
print('test1')
player.CharacterAdded:connect(function(character)
print('222222')
if character.Head.face.Texture == "http://www.roblox.com/asset/?id=7074749" then
print('3333333')
game.Lighting:FindFirstChild("Action"):clone().Parent = player.Backpack
print('4444444')
end
end)
end)


Output:
test1
222222




that's it.....
Report Abuse
MrChickens is not online. MrChickens
Joined: 21 Feb 2009
Total Posts: 1076
20 Aug 2012 09:22 AM
It never prints 333333 because the script stops at the
"if character.Head.face.Texture == "http://www.roblox.com/asset/?id=7074749" then"
restriction. You need to wear the chill face into the game, find the actual asset id, and paste that into the script (Not the ID from the shop)
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
20 Aug 2012 09:23 AM
^There's your solution.
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 06:25 PM
Why do you think i put the chill ID? I'm wearing it, i got the id from play solo, from my actual face. (No not the one reading this comment xD)
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 07:01 PM
Blump
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
20 Aug 2012 07:09 PM
For diagnostics, try this:

game.Players.PlayerAdded:connect(function(player)
print('test1')
player.CharacterAdded:connect(function(character)
print('222222')
if character.Head.face.Texture == "http://www.roblox.com/asset/?id=7074749" then
print('3333333')
game.Lighting:FindFirstChild("Action"):clone().Parent = player.Backpack
print('4444444')
else
print("Failed! the ACTUAL texture is: " .. character.Head.face.Texture)
end
end)
end)
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 07:35 PM
Im sooooo confused..
Output:
Failed! the ACTUAL texture is: rbxasset://textures/face.png


This is the ACTUAL copy and pasted texture: http://www.roblox.com/asset/?id=7074749

O_e
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 08:34 PM
Alright, i think the problem is, it loads the face after the script runs, so the chill face hasn't appeared yet, i tried putting a wait, but then it wouldn't run period, anyone know where i would put a wait in there?
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
20 Aug 2012 08:36 PM
repeat wait() until p.Character

† KMXD 2.0 †
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 08:46 PM
Where in the script do i put it?

Knight? You get banned or something?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
20 Aug 2012 08:53 PM
No, he didn't.
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 09:04 PM
Miiiiiiiiiz!! :D Hai.
Oh ok, he had 2 alts posting a lot so i thought he was banned.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
20 Aug 2012 09:06 PM
Nah, he's too dull to be banned :P
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 09:15 PM
Lolz, well can you answer my question then?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
20 Aug 2012 09:18 PM
repeat wait() until player.Character
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 09:21 PM
Lol, i meant where i put it.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
20 Aug 2012 09:22 PM
whoa WHAT!?!?!? IMA GET BANNED RIGHT NOW

† KMXD †
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
20 Aug 2012 09:27 PM
Lolwut?
Report Abuse
wow75 is not online. wow75
Joined: 16 Jan 2009
Total Posts: 951
21 Aug 2012 07:01 PM
Super late bump...
Where would i put the repeat wait() until?
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
22 Aug 2012 01:49 PM
You don't need that.
Try this:

already = false
game.Players.PlayerAdded:connect(function(player)
print('test1')
player.CharacterAdded:connect(function(character)
print('222222')
while true do
if character.Head.face.Texture == "http://www.roblox.com/asset/?id=7074749" then
print('3333333')
game.Lighting:FindFirstChild("Action"):clone().Parent = player.Backpack
print('4444444')
wait(9000)
else
if already == false then print("Failed! the ACTUAL texture is: " .. character.Head.face.Texture) end
already = true
wait()
end
end
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