local me = script.Parent.Z1 local EXP = script.Parent.EXP local Gold = script.Parent.Gold local plr = game.Players.LocalPlayer local lstats = plr:WaitForChild("leaderstats") game.Players.PlayerAdded:Connect(function(Player) local ree = me:Clone() ree.Parent = lstats end)
My script is supposed to clone a folder with scripts inside of it, and it wont work for some reason. I check inside of the player, and it doesn't show, or even run the scripts. If you know what's wrong, please tell me! Thanks.
just extract the folder you have into StarterPlayer\StarterPlayersScripts
Put your ServerScript that's handling the cloning into ServerScriptService, and then put the Folder inside of ReplicatedStorage and call it from there.
ServerScript
game.Players.PlayerAdded:Connect(function(player) local me = game:GetService("ReplicatedStorage"):WaitForChild("Z1"):Clone() local EXP = game:GetService("ReplicatedStorage"):WaitForChild("EXP"):Clone() local Gold = game:GetService("ReplicatedStorage"):WaitForChild("Gold"):Clone() me.Parent = player:WaitForChild("leaderstats") EXP.Parent= player:WaitForChild("leaderstats") Gold.Parent = player:WaitForChild("leaderstats") end)
All you have to do is put a Folder inside of ReplicatedStorage with all the scripts, and then put a ServerScript inside of ServerScriptService and write the code above.