GUI Camera Movement

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    A fixed and working script.

  2. What is the issue? Include screenshots / videos if possible!
    Camera moving left and right whenever the player moved or pressed WASD

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Anchored Humanoid Root Part, Walkspeed set to 0, and tried finding over topics about this wasn’t successful.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local CurrentCamera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local character = Player.Character or Player.CharacterAdded:Wait()


local newcamera = workspace.CAMERAS.Poster
wait (.001)
character.Humanoid.WalkSpeed = 0
print("changed speed")
character.HumanoidRootPart.Anchored = true
print("anchored")
CurrentCamera.CameraType = Enum.CameraType.Scriptable
CurrentCamera.CFrame = newcamera.CFrame

local function playEntered()

	CurrentCamera.CFrame = newcamera.CFrame
end



image

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

dont ask about the poster, literally just found it in a meme GC

2 Likes

I’m not sure what the issue here is. You cannot just tell us your goal is a “working script”, and I don’t know what your issue is.

However, if you are trying to anchor the camera somewhere, consider setting the subject of the camera to nil or setting the CameraType to Fixed.

Sorry, but the issue is that the camera starts rotating whenever the player starts moving, i tried anchoring the humanoidrootpart and changing walkspeed.

But, ill try setting the camera to nil or Fixed.

In that case, you can set the Camera type to Enum.CameraType.Fixed

Just tried it but the camera direction is off now, and it changes every time i re test the game.

You have to set the CFrame of the camera, or else it just assumes the position it was left on.

Alright, will try it I’m just learning how to script so all this is new to me.

Sure. Make sure to mark the solution for others to see and consider leaving a like :smile:

I ended up making the CFrame work but the rotation keeps messing up.
Do you know anyway to fix that?

Its supposed to be facing the other way btw.

CFrame has a Rotation property too.
Try CFrame.new(Vector3 (Position) COMMA Vector3 (Rotation))

Im gonna try this later i need to get some sleep lol and im tired of trial and error .

You should refer to the documentation publicly available on Roblox Creator Hub. Close this thread because the solution has already been outlined

2 Likes

ended up fixing it, wasnt any of the camera movement it was another script lol. now i need to figure something out.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.