Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Can Anyone Explain What This Script Means?

Asked by 8 years ago

Hi. I was reading the Scripting Book on wiki.roblox.com, and on chapter 7, they game me a script that is:

code = [[ p = Instance.new("Part", game.Workspace) p.Anchored = true ]]

loadstring(code)()

Can anyone explain what this means?

0
i meant to say gave.... supercoolboy8804 114 — 8y
0
http://wiki.roblox.com/index.php?title=Function_dump/Basic_functions#loadstring , though I wouldn't recommend usage as it can be exploited. Pyrondon 2089 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

The basic function on how this works is that it will load the code from above. The bottom code will explain it.

code = [[ p = Instance.new("Part", game.Workspace) p.Anchored = true ]] -- The code that will be called on.

loadstring(code)() -- Calls on the code, using loadstring.

Now if you would like to read more on it, here is the wiki page.

0
thanks this really helped! supercoolboy8804 114 — 8y
0
No problem. JamesLWalker 297 — 8y
Ad
Log in to vote
-1
Answered by 8 years ago

"code = [[ p = Instance.new("Part", game.Workspace) p.Anchored = true ]" That means that the part will be anchored, and it will not fall. "loadstring(code)()" I do not know what that means, sorry :(

Answer this question