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)
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.
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.
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
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…
Or that hahahah, anyways it seems you solved it by yourself. Nicely done!