of     1   

MasterXertz
#140671641Thursday, July 17, 2014 10:28 PM GMT

Why would the GetChildren() Function not work? Everything above and below works. local human = hit.Parent:findFirstChild("Humanoid")--Finds Humanoid human.WalkSpeed = 0 --Sets Walkspeed to 0 (freeze) human.Jump = true script.Parent.Parent:GetChildren().CanCollide = false script.Parent.Parent:GetChildren().Anchored = false wait(4) human.Health = 0 end
Notunknown99
#140671719Thursday, July 17, 2014 10:29 PM GMT

Your issue is that you cannot just do that. You need to iterate over the table and change the properties of all parts.
Notunknown99
#140671793Thursday, July 17, 2014 10:30 PM GMT

for i,v in next, obj:GetChildren() do if v:IsA'BasePart' then v.Anchored = true v.CanCollide = false end end
BJCarpenter
#140672247Thursday, July 17, 2014 10:34 PM GMT

script.Parent.Parent:GetChildren() returns a table or Parts; not a Part, so u should be getting an error message. Do u have Output Open? Are you testing in Studio? Are u reading the Output. try this list = script.Parent.Parent:GetChildren() -- get table for I = 1, #list -- # returns the number of entries in a table print(list[I]) -- square brackets allow u to access the table. (Read prints in Output end -- for
Notunknown99
#140672535Thursday, July 17, 2014 10:37 PM GMT

"so u should be getting an error message." Incorrect. It returns a table, but that table has no metatable preventing new key-value pairs being added.
MasterXertz
#140673671Thursday, July 17, 2014 10:48 PM GMT

This is what I changed it too, and it's not working. local human = hit.Parent:findFirstChild("Humanoid")--Finds Humanoid human.WalkSpeed = 0 --Sets Walkspeed to 0 (freeze) human.Jump = true for i,v in next, obj:GetChildren() do if v:IsA'Part' then v.Anchored = true v.CanCollide = false end
Notunknown99
#140673742Thursday, July 17, 2014 10:49 PM GMT

Apply common sense and the output.
Scriptos
#140674078Thursday, July 17, 2014 10:52 PM GMT

local human = hit.Parent:findFirstChild("Humanoid"); human.WalkSpeed=0; human.Jump=true; for i,v in pairs(human.Parent:GetChildren()) do if (v:IsA("Part")) then v.Anchored=true; v.CanCollide=false; end end; > This will work assuming that you already have a touch function.
smiley599
#140674552Thursday, July 17, 2014 10:58 PM GMT

Do you need common sense to see you're missing an end (not you, scriptos)

    of     1