#Snappy Custom Shiftlock

1 messages · Page 1 of 1 (latest)

steel tundra
#

So, I've been trying to create a custom camera system similar to Shindo Life's or Deepwoken's. Basically, it works like this. when you aren't pressing Shift, you are in regular shiftlock, but when you hold Shift, the camera unlocks and it lets u look around ur character, but the transition between the shiftlock and the 360 snaps like in the video, and i tried everything from ChatGPT and using the roblox assistant, but I can't fix it

#

this is the script i used

empty rapids
#

you can't fix it the ai can't fix it.
*fixed

steel tundra
#

thats true

empty rapids
#

you've been trying to create you've been asking ai to create*
*fixed

#

i'm not really sure what kind of help you're expecting? if we fix it for you, that's free labor. if we give you coding advice and directions how to fix it, you can't actually act on that because you don't know how to code. and you probably don't have any robux to hire someone. :/

#

that ai shortcut really working out for you hey

steel tundra
#

im only trying to use the ai bc i cant figure out whats wrong

#

The AI didn't create the entire script. i started it, and after I, got frustated I asked for help

#

all i need is the advice or directions

empty patrolBOT
#

studio** You are now Level 4! **studio

empty rapids
# steel tundra all i need is the advice or directions

advice: read the code

UserInputService.InputEnded:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftShift then
        isRotating = false
        enableFollowMode()
        -- Snap character to face camera look direction (flat on XZ plane)
        if rootPart then
            local camLook = camera.CFrame.LookVector
            local flatDir = Vector3.new(camLook.X, 0, camLook.Z)
            if flatDir.Magnitude > 0 then
                rootPart.CFrame = CFrame.new(rootPart.Position, rootPart.Position + flatDir.Unit)
            end
        end
    end
end)

i do wonder what that comment -- Snap character to face camera look direction (flat on XZ plane) might be talking about when your shift input ended.

there are no shortcuts to learning how to code

Teaches the basics of coding with Luau.

steel tundra
#

ok thanks

empty rapids
#

which perhaps unironically it seems like that code there is also duplicated as a function lua local function faceCameraDirection() if not rootPart then return end local camLook = camera.CFrame.LookVector local flatDir = Vector3.new(camLook.X, 0, camLook.Z).Unit if flatDir.Magnitude > 0 then rootPart.CFrame = CFrame.new(rootPart.Position, rootPart.Position + flatDir) end end

steel tundra
#

oh

#

im actually so stupid

empty rapids
#

ai will only set you up to fail. it's only good for things you already understand

steel tundra
#

ok, thanks for the advice Pyro

empty rapids
#

you can't cheat learning how to code and simply reading the code very carefully. there are no shortcuts.

#

i can read it fast coz i'm very well practiced. if you practice, you'll get that good someday too 👍

steel tundra
#

ok thank you