i've created a camera manipulation for my custom Gui. How it works is that it moves the camera to follow a brick, when ever a button is clicked. It works perfectly in studio mode The Camera Moves to the next object on every click. Not one signal error comes up. But as soon as i run a server test, or upload it and test it on play, nothing with the camera movement works and i get no errors. My camera controller is in a local script.
local function MoveCamera(Direction) local FollowBrick = MoveBrick:InvokeServer(Direction) Camera = workspace.CurrentCamera if(Direction ~= "End")then print("It is not End") Camera.CameraType = Enum.CameraType.Scriptable Camera.CameraSubject = FollowBrick Camera.CFrame = CFrame.new(0,25,1) Camera.CFrame = CFrame.new(FollowBrick.Position) * CFrame.new(0,0,1) * CFrame.Angles(0,math.rad(180),0) else Parent.Enabled = false end
Ok, Let me guess, your script isn't a local script. I have had experience with things working in studio but not in game. If it is a script, it will be trying to access your camera, but can't. workspace.Camera can be done with a local script, because the camera will be local to the player. I would basically just copy your script then make it into a local script.