Script Not Clone Folder Into ReplicatedStorage

hmph. I have no idea why this would happen if other scripts not mess with that folder

1 Like

i made it print clone name, and clone parent after parenting, and it says correct but its not exist
image

Can you provide some video when you click test or smth. Also try adding huge wait before it starts, and open rep storage as quick as you can. So you can see if it appears atleast for a second

2 Likes

all it does it print and thats all it does nothing else happens

I will test this on a baseplate

Try putting this code into ReplicatedStorage. This should tell you if it is actually being put into ReplicatedStorage and if it is possibly being removed.

script.Parent.ChildAdded:Connect(function(child)
	print(child.Name)
end)

script.Parent.ChildRemoved:Connect(function(child)
	print(child.Name)
end)
3 Likes

I have thought of a WaitForChild inside.

1 Like

Scripts don’t run inside of ReplicatedStorage.

2 Likes

It might make more sense, as my script does not seem to be working.

1 Like

I ddi that, and it does not even print anything, so the script inserts into replicatedstorage, but it is not inside replicatedstorage

oh let me try that in workspace

I tried that but it still didnt work

Did you manage to make it work in an empty baseplate?

2 Likes

oh i have not tested that yet i will in a second if no furtur solutions and see

Could be because server tryes to call clone and parent things a lot before replicated storage created for client

1 Like

image
repdetector is the script in serverscriptservice detetcting childadded and childremoved in rep storage

it is being spawned and removed on less then a millisecond what is doing this

im trying on baseplate

That’s weird. This is absolutely some other code override, i’m like 99% sure there

1 Like

I found code that possibly works better, as my old script did not function likely for a multitude of reasons.
In ServerScriptService:

local repStorage = game.ReplicatedStorage

while true do
	if not repStorage:FindFirstChild("Spawnable") then
		print("No Spawnable")
	else
		print("Spawnable")
	end
	wait()
end
2 Likes

the baseplate works

yes i think something in my game is doing it

Also it’s always great to use game:GetService("") to use any service. Try also

--SERVICES
local ServerStorage = game:GetService("ServerStorage")
local RepStorage = game:GetService("ReplicatedStorage")
--VARIABLES
local spawnable = ServerStorage:WaitForChild("Spawnable")
local cln = spawnable:Clone()
cln.Parent = RepStorage
1 Like

That wouldn’t be necessary but great checking script ^^’

1 Like


Hm i tryed to do some quick code to delete that folder, and if it was code override this would happen if it runs instantly after test button

1 Like