How do I make a script change another script into a different parent while still working

So, I’m trying to make a Script that changes a LocalScript parent. Like when the game starts the script will clone the LocalScript and place it into StarterPlayerScripts.

Script:
local Starter = game.StarterPlayer.StarterPlayerScripts
local Script = script:WaitForChild(“LocalScript”)

local copy = Script:Clone()
copy.Parent = Starter
wait(1)
script:Destroy()

So what are you asking exactly, are you asking how you could do it mid game when adding it to starter player scripts wouldn’t work until they die.

In that case you would clone it twice and place on in sps and one in playergui

Edit: I should clarify that you would loop through the players to place the playerGui one, also it’s temporary so you still need to add one clone to starter player scripts for when people join and or die

1 Like