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

How do you run a script with another script?

Lets say we have script B which is print('Loaded') and script A which is game.Workspace.B:Clone() Cloning the script wouldn't run the script, so how would you run it?

1 answer

✓ Accepted answer

You have to give the script a parent for it to run.

Fixed Code:

--This should go in script A.

scriptClone = game.Workspace.B:Clone() --Sets a variable for the cloned script.
scriptClone.Parent = game.Workspace --Parent the cloned script so it will run in the game.

If I helped you out, be sure to accept my answer! :D

2 comments

0

He could also consider using coroutines.

0

Or Bindables.

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