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

Can a LocalScript disable itself?

Asked by 6 years ago

Considering my game is Filtering Enabled (experimental mode off), is it possible for a LocalScript to toggle its Disabled property directly, without the use of remote events/functions?

For example:

script.Disabled = true

Be it that be the code inside a LocalScript, will it replicate to the server?

2 answers

Log in to vote
1
Answered by 6 years ago

When a local script runs, its contents aren't being "replicated to the server", they're simply being run on the client. Also, yes, a script can disable itself

something.Event:Connect(function()
    script.Disabled = true
end)
Ad
Log in to vote
-1
Answered by 6 years ago

I have tried that before and in my experience, you can't.

You have to do it manually.

( Once again this is from my knowledge so I don't think so. )

Hopefully this answers your question.

Answer this question