There seems to be something wrong with my menu camera. This is the script I have:
> local RunService = game:GetService("RunService")
> local Mouse = game.Players.LocalPlayer:GetMouse()
> local Camera = game.Workspace.CurrentCamera
>
> local MenuCamera = game.Workspace.MenuCamera
> local Move = 150
>
> function UpdateCamera()
> local Center = MenuCamera.CFrame
> local MoveVector = Vector3.new((Mouse.X - Center.X )/Move,(Mouse.Y - Center.Y)/Move, 0)
> script.Parent.Frame.PlayButton.Modal = true
> Camera.CFrame = MenuCamera.CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Center.Y)/Move), math.rad(-(Mouse.X - Center.X)/Move), 0)
> end
>
> RunService.RenderStepped:Connect(UpdateCamera)
>
> script.Parent.Frame.PlayButton.MouseButton1Click:Connect(function()
> game.ReplicatedStorage.RemoteEvents.StartGameEvent:FireServer()
> Camera.CameraType = Enum.CameraType.Custom
> script.Parent:Destroy()
> end)
At the same time, I have a part called “MenuCamera” - spelled exactly the same way, and it is in the workspace.
Here’s the thing, this works PERFECTLY in the ORIGINAL place I made this in, but when I copy and paste everything from that place into the new place, it just doesn’t work. Then, I get the error of
“MenuCamera is not a valid member of Workspace” - this is confusing because it’s literally in the workspace,.
Things I have tried:
I have tried re adding everything.
I have tried using the AI assistant.
I have tried everything and nothing works.
(NOTE: I AM NOT A SCRIPTER, THIS COMES FROM A TUTORIAL ON YOUTUBE)
Here is a quick video of what is supposed to happen: https://youtu.be/hO3zOEu3Phg