|
| 11 Feb 2013 05:07 PM |
wait(4) if (obj:IsA("Hat")) then -- Check to see if the object is a hat wait(5) -- Give the player a chance to put the hat back on if (obj.Parent == script.Parent.Parent) then -- If hat is still just lying around, remove it obj:Remove() end end
So I want it to remove all the hats inside the script.Parent.Parent witch is the player right after they spawn. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:08 PM |
| You need to define obj and put a loop at the top, and stop copying games. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:09 PM |
| OBJ is the hat... And I do what I want. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:10 PM |
| Obj is not a hat since Obj is undefined in the script you posted, also copying is against the Roblox TOS. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:11 PM |
Taking uncopylocked games is not against the rules Fyi.
|
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:12 PM |
game.Workspace.ChildAdded:connect(function(obj) -- Track new items added to the workspace if (obj:IsA("Hat")) then -- Check to see if the object is a hat wait(5) -- Give the player a chance to put the hat back on if (obj.Parent == game.Workspace) then -- If hat is still just lying around, remove it obj:Remove() end end end)
can someone turn the obj into ON RESPAWN? |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:15 PM |
| Turning it into on respawn would make no difference since obj would be the player model. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:15 PM |
| I am neutral with Jared, and if you need help, I would suggest asking imnotaguestimagirl. |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Feb 2013 05:20 PM |
| I'm not very good at scripting, I am trying to learn from a friend. Scripting seems very interesting! |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:20 PM |
| If we support copying noobs like him who steal places which are not copylock oh btw(That paintball game is one example), then we support a Roblox that isn't worth playing. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:27 PM |
| I never said I support him... |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:33 PM |
| Neutrality is support in this case. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:39 PM |
I have nothing against you so...
i tested it this works...
Game.Workspace.ChildAdded:connect(function(obj) if obj:IsA("Hat") then local old = obj.Parent wait(5) if obj.Parent == old then obj:Destroy() end end end) |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:40 PM |
| Why define old if it is not used? Also, that is not what he wanted. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:41 PM |
| http://www.roblox.com/Paintball-Uncopylocked-place?id=72961349 |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:42 PM |
| I did use the variable "old" ... and now i am not sure what he wants... |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:45 PM |
| Firstly two above your not the real daxter, also notsopwnedg you defined it but never did anything with the definition so the variable old was useless. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:46 PM |
Erm...It was definatly used...
if obj.Parent == old then
|
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:46 PM |
| Didn't notice that, but it is still useless because you are comparing its parent to its parent. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:51 PM |
| How would I just clear all script.Parent.Parent hats? |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:51 PM |
not really i am comparing it to its old parent so if a player picked up that had it wouldn't be deleted. or i could have just done:
if obj.Parent == Workspace then obj:Destroy() end |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:52 PM |
| so you want to clear the players hats when they spawn? |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2013 05:54 PM |
Noonon the player has a lot of hats in it I want it to CLEAR all the hats.
Here show it looks
PLAYER . Hat .Left arm .Right arm > SCRIPT > MAIN SCRIPT inside SCRIPT |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 11 Feb 2013 05:55 PM |
| Your comparing its parent in the same frame, it is impossible that it would change parents. |
|
|
| Report Abuse |
|
|