Worked in other place but not in my Main Game why?

what is wrong ? it worked at a other place where i made it, but not working anymore in my main game.

According to the error, it’s attempting to find the CamPart inside the StartGameFolder

Could you double-check to make sure that is what you’re trying to find? (Why my edit not working bruh)

1 Like

You’ll need to use :WaitForChild("CamPart") instead of directly trying to do .CamPart. Any time you’re trying to find something in the workspace from a LocalScript you should do this as network lag can impact instance download time.

4 Likes

There doesn’t seem to be CamPart object in StartGameFolder. Check Explorer and see if there is one in StartGameFolder. If there is, you should try using :WaitForChild() as @EncodedLua said.

1 Like

oh opsi ik how to do it sry my brain got blackout

alright but now i got another problem:
infiniete yield possible on Workspace.StartGameFolder:WaitForChild(“CamPart”)

i lookd and the CamPart Exists but hm idk what is wrong

The yield shouldn’t be that much of an issue, but was the CamPart able to change your camera view? If not you might need to use Camera.CFrame = campart.CFrame instead

nope camera view isnt changed but thx ill try it

thats the code:

wait(5)

local camera = game.Workspace.CurrentCamera
local CamPart = game.Workspace:WaitForChild(“CamPart”)

camera.CameraType = Enum.CameraType.Fixed
camera.focus = CamPart.CFrame

Can you post a screenshot of the part in the explorer? It shouldn’t warn you for an infinite yield

u mean that ?

Yes awesome.
So the problem is that you’re waiting for “CamPart” in workspace which it will never be in

local CamPart = game.Workspace:WaitForChild("CamPart")

What you should be doing is this:

local CamPart = game.Workspace.StartGameFolder:WaitForChild("CamPart")

The infinite yield warning should go away and the rest of the code should run now

oh god noo im so dumb i made an antilag script the script removed the “CamPart” thats the error…

Screenshot (246)

Or that hahahah, anyways it seems you solved it by yourself. Nicely done!

1 Like