Folder will not parent to Camera while in Team-Create

  1. What do you want to achieve?
    My folder will not parent to the current camera while in a team create place at all.

  2. What is the issue?
    My plugin creates a folder inside of the workspace.CurrentCamera, however, this folder does not show at all while in a team create place.

  3. What solutions have you tried so far?
    I have tried toggling Archivable, and even tried parenting it to different spots, however the folder needs to remain in the camera as that’s the only place I found where it is local to that specific client.

Heres the code that creates the folder:

repeat
	Camera = workspace.CurrentCamera
	task.wait()
until Camera ~= nil

-- These are other modules which the plugin uses
local Alerts = require(Utils.Alerts)
local Zipline = require(Utils.Zipline)
local StatsGui = require(Utils.StatsGui)

if Camera:FindFirstChild("FE2_StudioZiplines") then
	if Camera.FE2_StudioZiplines:FindFirstChild("_Zipline") then
		ZiplinesActivated = true
		ZiplineFolder = Camera.FE2_StudioZiplines
	else
		ZiplineFolder = Camera.FE2_StudioZiplines
	end
else
	ZiplinesActivated = false
	ZiplineFolder = Instance.new("Folder")
	ZiplineFolder.Name = "FE2_StudioZiplines"
	ZiplineFolder.Archivable = false
	ZiplineFolder.Parent = Camera
end
ZiplineFolder.Archivable = false
print("Created folder and parented to:", ZiplineFolder.Parent:GetFullName())

image
However nothing is parented
image
In a regular solo place, this works fine.

Any help is appreciated!

1 Like

Is this being ran from a script or localscript? Im pretty sure camera instances are local so if it is being ran from a script it is likely going to the server’s camera instance (or nil cause it might just be blank on the server)

It’s being ran on a localScript, so I don’t see why it doesn’t work

Just noticed that in a normal place the output is different:
image

Does this mean that the team create camera is somewhere else?

sorry for the late reply, im not too familiar with teamcreate stuff but its possible that it does have a different camera system due to the weird nature of how teamcreate handles stuff, since you said it works fine in solo it might just be due to teamcreate. I would test in game to see if it works though

Okay, thats fine! I’ve tested this ingame and in studio and it works fine for a solo place, I honestly don’t know why team create is being buggy.

is this a FE2 map? :thinking:

I believe it does (otherwise everyone would share the same camera), it probably works like live servers (each player has different camera instances)

Haha yes it is

Hm, I’m just not sure why it prints that it parents it to the camera, yet nothing shows. I might need to find a way to only replicate it to one player

Can you show in explorer the childrens of the camera object? (on runtime)

What do you mean by on-runtime?

When you start a server/play solo can you show the childrens of the camera instance

This is a plugin, I don’t see why I need to play it?

Problem solved 8 months later haha
I just needed to wait around 5 seconds for the camera instance to load, not sure why this works but I’m not changing it :smiley:

If anyone else has this problem, here’s a rough recreation of what worked for me (keep in mind that my plugin doesn’t need to run instantly)

-- ...
local camera;

print("Starting")
wait(5)

if workspace.CurrentCamera then
  camera = workspace.CurrentCamera
else
  repeat
    camera = workspace.CurrentCamera
    wait(0.5)
  until camera ~= nil
end
-- ...