Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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!

2 comments

0

Your link comes back to this question

0

sry, fixed

This discussion is preserved as it was. New answers, comments, and votes are closed.