[SOLVED] Removing Hats Script -- Not working?
So, I have a script that manipulates multiple things inside the character and fires when someone enters the game, or respawns (or dies).
01 | game.Players.PlayerAdded:connect( function (player) |
02 | player.CharacterAdded:connect( function (c) |
03 | print 'fetching player' |
06 | print 'fetching character' |
07 | local char = player.Character |
08 | local hum = char.Humanoid |
09 | local head = char.Head |
11 | print 'invisible head and no name' |
13 | for _, v in pairs (char:GetChildren()) do |
20 | local h = Instance.new( "Hint" , game.Workspace) |
21 | h.Text = "Welcome " ..player.Name.. " to GAMENAMEHERE" |
24 | local h 2 = Instance.new( "Hint" , player.PlayerGui) |
25 | h 2. Text = "All hats are removed so you get more anti-gravity effect" |
30 | local nograv = Instance.new( "BodyForce" , char.Torso) |
31 | nograv.force = Vector 3. new( 0 , 2000 , 0 ) |
So far, everything in this script is working well, except for one thing.
1 | for _, v in pairs (char:GetChildren()) do |
The above code is not firing.
Help?