How to make a local script start another local script

I would like to be able to start a local script from another local script.
Can someone show me a code method?

Enable the other local script.

1 Like

but how can i make one local script start another

local LocalScript = Something.LocalScript -- Assigns  Variable to script

LocalScript.Enabled = true -- Enables script

I’m not sure why you would do this tho.

I don’t think there is a way to do this with local scripts, but you can just use remote events for server scripts.

It is Possible, its just that it will only work for the Player

But aren’t remote events for contacting the server and client?

Local script for just for one player, and you need the regular script as the server side.

When was this put inside the topic?

They are asking how to Enable a LocalScript from a LocalScript, and they only work for the Player

I was just saying how it would be possible with regular scripts, if that were an option.

If i enable a script from another one, does it start it?

It starts it instantly when enabled

1 Like

If you changed the enabled property, it would start the script but not if it were a function, you would need to activate the function within the script

if it in a function, you can just do

functionName()

obviously you would replace “functionName” with the name of the function.

You are getting a bit off topic, be careful

Yes, it is true you can Activate a function within a script, but if you want to transfer data between Client to Server and vice versa, You use a RemoteEvent or RemoteFunction, If you want to transfer data from Script to Script, you use a BindableEvent or BindableFunction

3 Likes

I found the solution.
thank to all robloxians who helped me.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.