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

How do I edit a script from a plugin script?

Asked by 5 years ago
Edited 5 years ago

I need help. I went to another post made 3 years ago and it had this important line. Let me make it my way.

script1.Source = script1code

Full code:

btn1_1.MouseButton1Click:connect(function()
    local script1 = Instance.new("Script",workspace)
    local script2 = Instance.new("LocalScript",script1)
    script1.Name = "Shift to Run"
    script2.Name = "SprintScript"
    script2.Disabled = true
    local script1code = [[ … ]]
    local script2code = [[ … ]]
    script1.Source = script1code
    script2.Source = script2code
end)

I haven't tested it yet so I do not know the results but if you have any better ideas please let me know! - CrastificeDude612 :)

0
No help after 2 minutes? ;c CrastificeDude612 71 — 5y
0
... 10 minutes 0_0 CrastificeDude612 71 — 5y
0
Well you're out of luck. Scripts cannot do this. The ServerScriptService is inaccessible by clients. Also, the parent argument to Instance.new is deprecated User#19524 175 — 5y
0
I dont mean scripts in DataModel (game), I mean plugin scripts. So I don't really believe you. CrastificeDude612 71 — 5y
View all comments (3 more)
0
Plugin scripts cannot do this. This is because a user can download a malicious plugin that sets all of the game's scripts to blank source/source that runs malicious code. Simple as that. User#19524 175 — 5y
0
Okay, I see what you mean. Thanks a lot. CrastificeDude612 71 — 5y

Answer this question