Okay, so I want to clone a localscript from a script in Workspace and put it into a player's StarterPlayerScripts class. I know that the method to do this is to assign the cloned script a new parent saying "script.MYscript:Clone().Parent = _____" except I'm not sure how to fill the blank. I have tried many things, but I either get an error (object is not a valid member of object) or I find out that the cloned script doesn't work the way it should. Please note that I only want to send the script to one player, not all of them at once.
I learned that "script.MYscript:Clone().Parent = Player.PlayerScripts" will not work on account of an error that says, "PlayerScripts is not a valid member of Player." I also added a remote event with a "player" parameter shown below, though I am unsure if this helps or hurts my code. Thoughts/Ideas?
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
print(player.Name.." will now receive a script.")
script.MYscriptl:Clone().Parent = _________
end)

1 comment
What is your point for wanting to do this? I feel as though you are over-complicating it.