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

Is there a way to delete a script that was loaded in via loadstring()?

Asked by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
7 years ago

Hey guys! Haven't asked a question in quite a while, but this topic happened to cross my mind. Say I load a script in via loadstring() and I then want to disable it/delete it, how would I do so? I've tried script.Disabled within the loadstring, but it didn't seem to work. I plan to have several scripts loaded in via loadstring(), and some will need to disable/delete itself so it doesn't lag up the game. Any suggestions?

0
Welp, someone answered it for me on discord. The answer is no Shawnyg 4330 — 7y

1 answer

Log in to vote
1
Answered by
Link150 1355 Badge of Merit Moderation Voter
7 years ago

No. loadstring doesn't create a new Script object, it simply interprets a string and returns a function to execute it. Furthermore, it is not a Roblox feature, it is a standard Lua function.

0
I didn't want that to be the answer qq. I knew it in my head, but I prayed to Telamon (not shedletsky, telamon is elite) that there was another way. Shawnyg 4330 — 7y
1
'Should've prayed to Builderman. Link150 1355 — 7y
0
Dude, naw. Telamon was og. Screw shedletsky, username changing thing screwed everything up. EzraNehemiah_TF2 3552 — 7y
0
@LordDragonZord I agree. Link150 1355 — 7y
Ad

Answer this question