|
| 08 Jan 2014 04:06 AM |
| What is the script to unanchored everything? |
|
|
| Report Abuse |
|
|
Cubyfan22
|
  |
| Joined: 02 Apr 2013 |
| Total Posts: 7261 |
|
|
| 08 Jan 2014 04:19 AM |
That is none of your concern.
Refugio para el alma perdida - Cubyfan2/CommanderUnity | Add 16,381 Posts |
|
|
| Report Abuse |
|
|
|
| 08 Jan 2014 04:57 AM |
| Thanks for answering. Now, can a non-childish person answer me? |
|
|
| Report Abuse |
|
|
Cubyfan22
|
  |
| Joined: 02 Apr 2013 |
| Total Posts: 7261 |
|
|
| 08 Jan 2014 06:08 AM |
No, I mean that is really none of your concern because that script is linked to exploiting right now.
Refugio para el alma perdida - Cubyfan2/CommanderUnity | Add 16,381 Posts |
|
|
| Report Abuse |
|
|
duckwit
|
  |
| Joined: 08 Aug 2008 |
| Total Posts: 1310 |
|
|
| 08 Jan 2014 06:12 AM |
Look into the term "recursion", you need to write a recursive function that calls itself with the children of that instance. It would work like this: You pass in "game" as a parameter to the function. The function says "if THING (passed variable) is a BasePart, then un-anchor it" Get the children from THING. For each of the children, call the function with them as the parameter.
I won't write it for you, but give it a go and let us know what you come up with, we'll help you improve it. What do you want it for, though? |
|
|
| Report Abuse |
|
|
|
| 08 Jan 2014 02:51 PM |
| A game I'm making, it's called "Project". I didn't understand anything you just wrote, can you please write it? |
|
|
| Report Abuse |
|
|
duckwit
|
  |
| Joined: 08 Aug 2008 |
| Total Posts: 1310 |
|
|
| 08 Jan 2014 02:57 PM |
| @igeorge, we are here to help you with writing scripts and not to write them for you. If you are unwilling to invest time in learning basic principles of scripting, then you cannot expect us to devote a further second to attending to your pleas. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 03:50 AM |
Your reply makes no sense whatsoever.
"Look into the term "recursion", you need to write a recursive function that calls itself with the children of that instance. It would work like this: You pass in "game" as a parameter to the function. The function says "if THING (passed variable) is a BasePart, then un-anchor it" Get the children from THING. For each of the children, call the function with them as the parameter. "
What? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 03:51 AM |
| Can I get someone else to help me instead of people who aren't willing to help me just because exploiting is going around? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 05:01 AM |
They just did help you.......
Scripting Helpers refers to editing scripts you make!
fill in de blanks!
for _,V in _____(workspace:Get________()) do if _:IsA("________") ____
v._______ = false
___
end
replace _ with what u think is correct! |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 05:02 AM |
And google "Recursion"
and start your "did you mean:" adventure! :D |
|
|
| Report Abuse |
|
|
duckwit
|
  |
| Joined: 08 Aug 2008 |
| Total Posts: 1310 |
|
|
| 09 Jan 2014 05:05 AM |
Let me try again.
Look into the term "recursion", a recursive function is one that triggers itself. For example: function ARecursiveFunction(a) print(a) ARecursiveFunction(a+1) end ... this would infinitely increase "a" and print it.
You need to write a recursive function that calls itself with the children of that instance. An instance is an object in Roblox, like a Humanoid, a Part, a Model, a VehicleSeat, a Tool, anything in Roblox. Children are the descendants of that object, objects that are stored under that Instance in the file tree.
So you need a function that sends the children of the instance that was passed to it to ITSELF:
function unanchor(thing) children = thing:GetChildren() for i, #children do unanchor(children[i]) end end
Then all you need to do is add in a bit that checks what type of object the instance is, and anchor it if it is a "BasePart". It would work like this: You pass in "game" as a parameter to the function. The function says "if THING (passed variable) is a BasePart, then un-anchor it" Get the children from THING. For each of the children, call the function with them as the parameter. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 03:26 PM |
| You know what? nevermind. I've had helpers give me the script. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 07:11 PM |
| You're not gonna get far at all if you're not gonna learn. |
|
|
| Report Abuse |
|
|
duckwit
|
  |
| Joined: 08 Aug 2008 |
| Total Posts: 1310 |
|
|
| 10 Jan 2014 10:09 AM |
I am really beginning to hate how people like @igeorge behave. It's people like him that are totally spoiling the scripting community.
Invest some time and at least try and learn the language, igeorge. Begging is humiliating. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jan 2014 07:00 PM |
Please leave SH, and don't come back until you have YOUR OWN scripts, to edit/fix.
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
duckwit
|
  |
| Joined: 08 Aug 2008 |
| Total Posts: 1310 |
|
|
| 10 Jan 2014 07:20 PM |
I. Am. Useless. I am so useless, that I can even learn things for myself without begging other people for them. What a shame! I am so embarrassed.
I am English, by the way, I have a right to be extremely sarcastic every once-in-a-while. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jan 2014 09:11 PM |
local c = game.Workspace:GetChildren() for i=1, #c do if c[i].className == "Part" then c[i].Anchored = false c[i].CanCollide = false end end
|
|
|
| Report Abuse |
|
|
|
| 10 Jan 2014 09:40 PM |
factorial Recursion
function factor(x) if x<=1 then return 1 end else return x*factor(x-1) end
print(factor(5))
---
>> 120
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 10 Jan 2014 09:50 PM |
Just an example of recursion, and it's how you find factorials.
very basic.. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Jan 2014 09:54 PM |
No
function factor(z) if z > 1 then local total = 1 for i = z, 1, -1 do total = total * i end return total end return z end
print(factor(5))
Is a lot more efficient and easier to understand |
|
|
| Report Abuse |
|
|