menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripting Helpers
Can you tell me what iswrong with this?
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
Can you tell me what iswrong with this?
Sentonis
Join Date: 2009-02-19
Post Count: 1435
#141243389
Wednesday, July 23, 2014 4:46 AM GMT
function getParent() if script.Parent.Parent == game.Workspace then script.Parent:remove() end Thanks
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
BothAngles
Join Date: 2011-12-01
Post Count: 9604
#141243654
Wednesday, July 23, 2014 4:49 AM GMT
function getParent() Spawn(wait)--wait so the parent isnt nil if script.Parent.Parent == game.Workspace then script.Parent:remove() end end
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Sentonis
Join Date: 2009-02-19
Post Count: 1435
#141244029
Wednesday, July 23, 2014 4:53 AM GMT
Thanks, but it doesn't seem to work. My problem is that a vehicle seat enters the workspace after the character dies rather than disappearing. I'm trying to make a script that removes the seat once it enters the workspace.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Sentonis
Join Date: 2009-02-19
Post Count: 1435
#141244958
Wednesday, July 23, 2014 5:02 AM GMT
bump
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
blox6137
Join Date: 2008-11-23
Post Count: 1109
#141245103
Wednesday, July 23, 2014 5:03 AM GMT
You didn't call the function.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
klkl
Join Date: 2007-08-29
Post Count: 887
#141245251
Wednesday, July 23, 2014 5:05 AM GMT
game.Workspace.Changed(function() for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == "Seat" then v:Destroy() end end end Should work
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
blox6137
Join Date: 2008-11-23
Post Count: 1109
#141245354
Wednesday, July 23, 2014 5:06 AM GMT
you forgot a parenthesis tsk tsk tsk
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
klkl
Join Date: 2007-08-29
Post Count: 887
#141246237
Wednesday, July 23, 2014 5:15 AM GMT
oops
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right