hmph. I have no idea why this would happen if other scripts not mess with that folder
i made it print clone name, and clone parent after parenting, and it says correct but its not exist
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
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)
I have thought of a WaitForChild inside.
Scripts don’t run inside of ReplicatedStorage.
It might make more sense, as my script does not seem to be working.
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?
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
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
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
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
That wouldn’t be necessary but great checking script ^^’