Camera is a part of workspace, but script says it isn't?
Asked by
2_MMZ 1059
4 years ago
Hello, I'm trying to make a GUI that changes the camera position to the part, here's the script that does so:
1 | local camera = game.Workspace.Camera |
3 | camera.CFrame = game.Workspace.menucamerapart.CFrame |
4 | camera.CameraType = Enum.CameraType.Scriptable |
5 | game.Lighting.Brightness = 0 |
6 | game.Lighting.ClockTime = 0 |
7 | game.Lighting.FogEnd = 20 |
In the output, it says "menucamerapart is not a valid member of Workspace "Workspace"
Can I get any help on this?