Problem with Part recognize by Roblox

Hello, I am Bloom berry , I am a beginner with only I think 5-6 months experience and I recently trying to make a game!

so, before I introduce the problem.
I have got these errors so many times,
so, in a nutshell, I am making a camera variable to find it’s CFrame but the problem is that the part is not getting recognized.
I am using Local script and in normal script everything perfectly.

so, error is pretty simple,
“a part is not a valid member in model” This is the simplest error that you might see, but I have tried so many times to fix it but still it does not do anything , I have used wait for child, find first child, literally everything but the error continues to go on, so what I want that when the part gets recognized it will provide the position value to the script so it can manipulate things but it does not work out and if I use Find first child or other thing it does not give its value or in this case it’s position

Can you please explain or provide information about this issue and how to get this fixed? I am very grateful for you all for helping me out.

Bloomberry,

4 Likes

It would be helpful if you shared some code or where the error in your code was occurring.

Typically when we want to get a player’s camera and store it in a variable, we’ll use a LocalScript and do
local camera = workspace.CurrentCamera.
From there, you can access all of the camera’s properties like its CFrame.

1 Like

This was actually occurring in local script and this is not a Current Camera, this a part that I named it Camera

1 Like

where did you parent the part in?
if you can, could you provide a portion of your code?

1 Like




now below i added find first child and did the same with wait for child and this are the errors


So here are the potion of the script and the errors that are occurring now remember that I changed the variable too and i moved the part from model to workspace

if the localscript is ran on player join i would recommend you to put WaitForChild on both camera parts

hey i did that too but still the error is that it’s index value is nil

findfirstchild returns nil if it doesn’t find anything, so make it waitforchild

in the 3rd picture i can see you trying to index another “camera1” and “camera2” within the parts itself, i think thats where the 2nd problem is

hey I tried wait for child too but still no solution and I also made 2 new part called camera1 and camera2 for you information Also is this because of local script?

i think its just some indexing issues

Like can you explain? and how it works?

idrk how to explain but

just try again, put waitforchild on the 2 variables, and fix the mistakes in the tweening thing (remove the second “camera1” and “camera2” after the variables)

Yeah sure, i Will definitely try it out

1 Like

did it work?
charcharcharcharcharchar

Do you have streamingenabled by any chance?

Maybe but What can happen with that?

Hey Can I just declare the camera in server script because the game is going to be 1 player so no huge impact?

Some parts in workspace may not render to client unless they fully walk onto (or get close to it)

Hey thanks for helping me out, it worked!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.