|
| 31 May 2014 10:41 AM |
basically it should just remove hats from players. ive seen it before but there are no models.
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 10:43 AM |
| Just loop through characters, check for hats then delete hats. |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 10:45 AM |
eh....
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 10:46 AM |
| Use :GetChildren() and a for loop. |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 10:47 AM |
ill say it once i cant script very well and pretty much 97/100 of the functions i have no idea.
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 10:53 AM |
-- localscript in startergui
local player = game.Players repeat wait() until player player.CharacterAdded:connect(function() for i, v in pairs(player.Character:GetChildren()) do if v:IsA("Hat") then v:Destroy() end end end)
should work... |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 May 2014 10:55 AM |
crap
-- localscript in startergui
local player = game.Players.LocalPlayer repeat wait() until player player.CharacterAdded:connect(function() for i, v in pairs(player.Character:GetChildren()) do if v:IsA("Hat") then v:Destroy() end end end)
I messed up on the player variable, I fixed it |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 10:56 AM |
@chop that doesnt work becuase it is looking for hats in the player, not the player's model.
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 10:57 AM |
@chop sorry, late post. its not doing anything, its removing the shirt?...
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:04 AM |
-- localscript in startergui
local player = game.Players.LocalPlayer wait(1) for i, v in pairs(player.Character:GetChildren()) do if v:IsA("Hat") then v:Destroy() end end
Ok I needed to add a wait cause the hats are added like 1 second after your character is. |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:06 AM |
| player:WaitForChild("Character") |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:07 AM |
still wont work after tinkering with the wait(). did you ever try to get the playermodel from the playerinstance?
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:08 AM |
| The code I posted works for me. Try changing it to wait(2) |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:08 AM |
"player:WaitForChild("Character")"
When I looped the character, I printed the values and the hat didn't show up. You have to add a wait to it. |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:09 AM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) wait(3); for i,v in pairs(char:GetChildren()) do if v:IsA('Hat') and v:findFirstChild('Handle') then v:Destroy(); end end end) end)
|
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:09 AM |
"Try changing it to wait(2)" ive changed it to even wait 10 and it still doesnt work.
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:10 AM |
here's one that removes hats when a character spawns. Put script in workspace.
game.Players.PlayerAdded:connect(function (plyr) plyr.CharacterAdded:connect(function (char) wait() local charstuff = char:GetChildren() for i=1.#charstuff do if charstuff[i].ClassName == "Hat" then charstuff[i]:Destroy() end end end) end) |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:10 AM |
@verified that doesnt work either...
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:11 AM |
| player:WaitForFkinChild("Character") |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 31 May 2014 11:12 AM |
@tecicy nope, still doesnt work...
I believe its latin for "Skip the boring parts". |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:12 AM |
| Did you wait 10 seconds? lol |
|
|
| Report Abuse |
|
|
|
| 31 May 2014 11:12 AM |
Verified's should work, Mine should too.
Remember, put the code in a NON local script in workspace. |
|
|
| Report Abuse |
|
|