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: help?

Previous Thread :: Next Thread 
jared2valdez4 is not online. jared2valdez4
Joined: 10 Sep 2012
Total Posts: 1514
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 is not online. 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
jared2valdez4 is not online. jared2valdez4
Joined: 10 Sep 2012
Total Posts: 1514
11 Feb 2013 05:09 PM
OBJ is the hat... And I do what I want.
Report Abuse
MrChubbs is not online. 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
jared2valdez4 is not online. jared2valdez4
Joined: 10 Sep 2012
Total Posts: 1514
11 Feb 2013 05:11 PM
Taking uncopylocked games is not against the rules Fyi.
Report Abuse
jared2valdez4 is not online. jared2valdez4
Joined: 10 Sep 2012
Total Posts: 1514
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 is not online. 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
Ashwin2000 is not online. Ashwin2000
Joined: 03 Oct 2009
Total Posts: 1189
11 Feb 2013 05:15 PM
I am neutral with Jared, and if you need help, I would suggest asking imnotaguestimagirl.
Report Abuse
Ashwin2000 is not online. Ashwin2000
Joined: 03 Oct 2009
Total Posts: 1189
11 Feb 2013 05:16 PM
She is a good scripter.
Report Abuse
Ashwin2000 is not online. Ashwin2000
Joined: 03 Oct 2009
Total Posts: 1189
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 is not online. 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
Ashwin2000 is not online. Ashwin2000
Joined: 03 Oct 2009
Total Posts: 1189
11 Feb 2013 05:27 PM
I never said I support him...
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
11 Feb 2013 05:33 PM
Neutrality is support in this case.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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 is not online. 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
daxter331 is not online. daxter331
Joined: 20 Feb 2012
Total Posts: 3
11 Feb 2013 05:41 PM
http://www.roblox.com/Paintball-Uncopylocked-place?id=72961349
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
11 Feb 2013 05:42 PM
I did use the variable "old" ... and now i am not sure what he wants...
Report Abuse
MrChubbs is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
11 Feb 2013 05:46 PM
Erm...It was definatly used...

if obj.Parent == old then
Report Abuse
MrChubbs is not online. 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
jared2valdez4 is not online. jared2valdez4
Joined: 10 Sep 2012
Total Posts: 1514
11 Feb 2013 05:51 PM
How would I just clear all script.Parent.Parent hats?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
11 Feb 2013 05:52 PM
so you want to clear the players hats when they spawn?
Report Abuse
jared2valdez4 is not online. jared2valdez4
Joined: 10 Sep 2012
Total Posts: 1514
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 is not online. 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
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