Script Not Clone Folder Into ReplicatedStorage

I have a script with two simple lines of code that won’t work

Spawnable folder goes in replicatedstorage, while testing on server and client it is not in replicatedstorage
image

The script:

local cln = game.ServerStorage.Spawnable:Clone()
cln.Parent = game.ReplicatedStorage

I put it in workspace too and it did not work

14 Likes

Try this inside your Script:
Script should be still inside ServerScriptService

local cln = game.ServerStorage.Spawnable
cln:Clone()
cln.Parent = game.ReplicatedStorage
5 Likes

it still is not working i dont know why the script is so simple

3 Likes

i made it print the parent of it and it print replicated storage but it is not there

2 Likes

i think you meant

local spawnable = game.ServerStorage.Spawnable
local cln = spawnable:Clone()
cln.Parent = game.ReplicatedStorage

in case you are setting original object parent not clone

2 Likes

No it worked before and randomly stop working

i made no changes

also i dont have to get the orginal object i can just do local cln = object:Clone() (i have done it many times before and it always work)

that’s true ^^’

– some gibberish –

2 Likes

Does it error anything or does nothing happen at all?

1 Like

Is ServerScriptService even Archivable? - set to true

2 Likes

nothing happens i even tried put a wait 1 delay

1 Like

Well i just tested that code with same things given, and folder clone correctly to rep storage

image

2 Likes

that is read only setting is true

1 Like

try my default code see if it works

if it does not something messing with it in my game

Works fine too
image

EDIT: Is this full code?

2 Likes

Yep, I tried that before too!

– again some gibberish –

2 Likes

yes that is the only two lines of code so i think something messing with it

Where is your script located at(mine is ServerScriptService)

1 Like

my script is in server script service and im checking my scripts none of them mess with any thing

yea none of my scripts mess anything

Try putting prints in your code to make sure everything is working as intended.

local cln = game.ServerStorage.Spawnable:Clone()
print("Cloned")

cln.Parent = game.ReplicatedStorage
print("Set Parent")

If it prints and nothing has happened still, other scripts may be interfering.

2 Likes