#camera move back

21 messages · Page 1 of 1 (latest)

twilit vault
dense mantle
dense schooner
twilit vault
twilit vault
dense mantle
#

doesn't happen to me

twilit vault
twilit vault
dense mantle
#

is the animation messing with the camera's position?

#

your tweening is okay

twilit vault
dense mantle
#
local RS = game:GetService("RunService")
local TS = game:GetService("TweenService")


local Player = game.Players.LocalPlayer
local Character = Player.Character
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")

local isCrouching = false

RS.RenderStepped:Connect(function()
    local DirectionOfMovemnt = HumanoidRootPart.CFrame:VectorToObjectSpace(HumanoidRootPart.AssemblyLinearVelocity)
    local Foward = math.abs(math.clamp(DirectionOfMovemnt.Z/Humanoid.WalkSpeed,-1,0.001))
    local Backwards = math.abs(math.clamp(DirectionOfMovemnt.Z/Humanoid.WalkSpeed, 0.001,1))
    local Right = math.abs(math.clamp(DirectionOfMovemnt.X/Humanoid.WalkSpeed,0.001,1))
    local Left = math.abs(math.clamp(DirectionOfMovemnt.X/Humanoid.WalkSpeed,-1,0.001))
end)



local CrouchGoal = {CameraOffset = Vector3.new(0,-1.75,0)}
local UncrouchGoal = {CameraOffset = Vector3.new(0,0,0)}

local CameraInfo = TweenInfo.new(
    0.75, 
    Enum.EasingStyle.Quint, Enum.EasingDirection.Out,
    0,
    false,
    0
)

local CrouchTween = TS:Create(Humanoid, CameraInfo, CrouchGoal)
local UncrouchTween = TS:Create(Humanoid, CameraInfo, UncrouchGoal)

local inCrouch = false

local function Crouch()
    if inCrouch == false then
        inCrouch = true
        CrouchTween:Play()

        Humanoid.WalkSpeed = 8

        HumanoidRootPart.CanCollide = false

    else

        inCrouch = false
        UncrouchTween:Play()
        Humanoid.WalkSpeed = 16

        HumanoidRootPart.CanCollide = true
    end
end

game:GetService("UserInputService").InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.C then
        Crouch()
    end
end)
#

i added to startercharacterscripts and it worked fine

#

just removed the animations

#

it does not move the camera back up

twilit vault
#

ohh wait maybe it not this script, cause i have others two script work with the camera, maybe that could be

#

let me chek that

#

yeee that was

#

mb

dense mantle
#

alright

twilit vault
#

sorry for bother you, and thanks for the help :D