Player walking in the reverse directions

Alright, so.

These days, I’ve been working on a build mode system, and I’ve implemented a camera system that moves using hotkeys. It works flawlessly till. I discovered the most serious error that affects the player: the character does not move in the correct direction. For example, if I press the “W” key, the player walks to the left or backwards, and the same is true for all other keys. (WASD)

My camera script modifies the CameraSubject, and if you’re curious, you can simply set the CameraMode to scriptable and it should work, right? No, my part gets stuck and it doesn’t move , and when the player presses the exit button, the camera subject goes back to its humanoid.

Here’s my script that changes the CameraSubject to the part:

local char = player.Character or player.CharacterAdded:Wait()
local cam = workspace.CurrentCamera
	
cam.CameraSubject = plot.BuildCam
controlCam(plot.BuildCam)

And here’s the script that changes it back to the humanoid:

local char = player.Character or player.CharacterAdded:Wait()
local cam = workspace.CurrentCamera

cam.CameraSubject = player.Character.Humanoid

Here’s an example of what happens when I hit exit (Which changes the camera subject to the Humanoid)

https://gyazo.com/040229a9d8ada55a3dcb351214900405

Strangely, the character in the example was walking backward while I was moving ahead.

I appreciate any help! Thank you.

2 Likes

after changing the camera subject back to the character humanoid, try changing the camera type to Custom

1 Like

Gonna do that right now! Thanks for the help.

Sadly, it doesn’t work, same error.

local char = player.Character or player.CharacterAdded:Wait()
local cam = workspace.CurrentCamera
– change camera type to scriptable here

cam.CameraSubject = plot.BuildCam
controlCam(plot.BuildCam)

– when changing it back

cam.CameraSubject = player.Character.Humanoid
– change it back to custom

1 Like

I already tried that, but that just gets my camera part stuck in its place :slightly_smiling_face:

cam.CameraSubject = character.Humanoid
cam.CameraType = "Custom"
cam.CFrame = character.Head.CFrame

or

save the camera cframe before doing anything then set it back to the variable after you are done like so

local char = player.Character or player.CharacterAdded:Wait()
local cam = workspace.CurrentCamera
local original = cam.CFrame
cam.CameraSubject = plot.BuildCam
controlCam(plot.BuildCam)

cam.CameraSubject = player.Character.Humanoid
cam.CFrame = original

None of them works either… I think the problem might be in the CameraSubject

try this instead

local char = player.Character or player.CharacterAdded:Wait()
local cam = workspace.CurrentCamera
local original = cam.CFrame
local offeset = vector3.new(0,0,-10) -- you would have to tweak this
cam.CFrame = plot.BuildCam.CFrame * CFrame.new(offset) -- assuming the part front is facing the plot
controlCam(plot.BuildCam)

forget about changing the camera subject entirely and see if that fixes it

1 Like

if one worked, kindly make that the solution. Thanks

Still doesn’t work…:pensive:

I would make it a solution of course, but it doesn’t work either. What do I do now?

Change

cam.CameraSubject = player.Character.Humanoid

To

cam.CameraSubject = player.Character.HumanoidRootPart -- or just the character
1 Like

Doesn’t work, just the same error.

Well just make a part and make it look at the plot, make the camera scriptable and set its cframe to that part, at the end set it to custom

1 Like

I already tried that; this thing is nearly impossible to make or something.

How so? Everything is possible if u kept trying. Maybe set the player to first person and then move him back?

This is quite bizarre in my opinion because everything should be working properly. Does the player’s HumanoidRootPart ever rotate 90-ish degrees in your scripts that’s somehow making the player’s character move weird like that?

1 Like

I will see. Thanks, this might be a solution.

Just tell me I’m stupid or anything, please.

I’m sorry @msix29 and @Dev_Breezy for spending your time trying to help me fix this silly error I made from this outdated script. The system is now excellent.

@MinionAlex4 Thanks for reminding me about that. Your post is the solution.

Very so sorry everyone.

1 Like

It’s alright, glad to help you out.