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: This doesn't work!

Previous Thread :: Next Thread 
alvin1104 is not online. alvin1104
Joined: 22 Feb 2011
Total Posts: 681
30 Aug 2014 04:45 AM
--This code is supposed to put a hat on a player when they enter the game if they are in a group. But for some reason it won't work!

local gid = 989031 --group id
local hatid = 1098277 --hat id

game.Players.PlayerAdded:connect(function(v)
if v:IsInGroup(gid) then
v.CharacterAdded:connect(function(vplr)
repeat wait() until v and vplr
vplr:WaitForChild("Humanoid")
game:GetService("InsertService"):LoadAsset(hatid):GetChildren()[1].Parent=vplr
end)
end
end)
Report Abuse
alvin1104 is not online. alvin1104
Joined: 22 Feb 2011
Total Posts: 681
30 Aug 2014 04:56 AM
B1
Report Abuse
alvin1104 is not online. alvin1104
Joined: 22 Feb 2011
Total Posts: 681
30 Aug 2014 05:08 AM
Come on! Pl0x help!
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
30 Aug 2014 05:10 AM
Remove the WaitForChild() and weld the hat to the player's head.
Report Abuse
alvin1104 is not online. alvin1104
Joined: 22 Feb 2011
Total Posts: 681
30 Aug 2014 05:12 AM
How will I weld it.
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
30 Aug 2014 05:16 AM
By creating the weld and setting the Part0, Part1 and C0 property?
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
30 Aug 2014 05:22 AM
A weld isn't necessary
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
30 Aug 2014 05:51 AM
No?
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