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

I've seen people set the source of a localscript to execute localscripts from a console?

Asked by 8 years ago

So I've been confused at how people are setting the source of a LocalScript and then running it. It's just like on Script Builder, I am not sure how they do it.. Can anyone give me some help?

I see a lot of loadstring() but that's only for server-sided scripts from what I know of.

I know I am kind of asking, but I am working on a game and I am adding a control pannel, it would be nice to execute both Local and Non-Local scripts!

-Thanks!

~Expresssion

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

Hello, Expression!

So the loadString() function does not run scripts. It actually runs strings. The inputted string would run like a command.

loadString("game.Players.RadioactiveSherbet.Character.Head:Destroy()")

This would run a string that would act like a command. This string would destroy my head (if I was playing).

You can learn more here

So for your case

Maybe in the GUI have a text input. And then when they type in a command and then click maybe a button. The string inside the input would run.

If this helped you, please upvote and accept answer, it helps both of us :)

Hopefully this helps, Radio

Happy coding!

0
Your link comes back to this question MrLonely1221 701 — 8y
0
sry, fixed RadioactiveSherbet 30 — 8y
Ad

Answer this question