for _,v in ipairs(game.Players:GetPlayers()) do
print('yay!')
local CameraAttachment = NEXUZ_STUFF_FOLDER.Cutscene.CameraSet:Clone()
CameraAttachment.Parent = v.Backpack
print(CameraAttachment.Parent.Name)
CameraAttachment.CameraPart.Value = Nexuz.CameraPart.Part
print(CameraAttachment.CameraPart.Value.Name)
end
(THIS IS NOT THE FULL SCRIPT! ITS THE LINE IM CONCERNED ABOUT)
So, the LocalScript does get parented to the player’s backpack.
But it destroys itself shortly after, which makes the localscript disable itself.
Is there a solution to this? Or I’m parenting it wrong?
If you have any theories, tell me.
I personally would not put it in the backpack. I would put it in StarterPlayerScripts.
Parenting it to the backpack is probably what is causing your issue, but I might be wrong.
I’m pretty sure the backpack deletes things that are not tools, but I’m not sure. I’ve never put anything but tools in the backpack.
Well, what I mean is when you clone the CameraAttachment, I would not parent it to the backpack. I would put it into the player’s PlayerGui personally. I’m assuming CameraAttachment is the LocalScript you are referring to, but correct me if I’m wrong.
Pretty sure, your code will only run inside a tool, local scripts do not run automatically in the backpack unless a tool is equipped/used or interacted with. Like other players suggested, you can put the script into the PlayerScripts folder or into any of the other categories below,