How can I change a scripts parent using a script?

Hello, I need to change a local script’s parent by using a script. I am making a game where you go through a portal and it makes your view Isometric. How I want the script to work is down under me:
The local script has to go into StarterPack because that’s how the isometric view script works.

script.Parent.Touched:connect(function()  --touching the portal

--the script to make it change the parent of the local script to "StarterPack"

end)

Thank you for your time!

1 Like

You could just do script.Parent = Parent and put it into a script and it should work because script.Parent is the script itself.

I’ll test it. Thanks!
30 chars

Did you define StarterPack as a variable? If not you should like this:

local StarterPack = game.StarterPack
2 Likes

Thanks!
(30 characters--------------------)