Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make camera manipulation create a shift lock kinda feel?

Asked by
Galicate 106
4 years ago
Edited 4 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

Okay so I have a sword fighting game, and the problem is that it's third person only which is fine, but when trying to fight and you end up just spinning in circles trying to hit your enemy, its kinda annoying. What I want to do, is make the camera be fixed onto the enemy's character, but still above your head, so you can see both yourself and the enemy and you are kinda in this shift lock state almost.

tl;dr - need camera to be fixed onto enemys character while still staying above my head

Any way I could do this? No code or anything just some kinda of explanation.

A small sample of code, This didn't really work.

if Key.KeyCode == Enum.KeyCode.Z and Equipped == true and Mouse.Target ~= nil and Mouse.Target.Parent:FindFirstChild("HumanoidRootPart") then
        workspace.CurrentCamera.CameraType = Enum.CameraType.Watch
        workspace.CurrentCamera.CFrame = Mouse.Target.Parent.Head.CFrame
    end

Answer this question