#camera move back
21 messages · Page 1 of 1 (latest)
I don't see an issue with this. When you press C it crouches and when you press it again it Stands up. Mine has no delay
maybe you could use fov and a for loop for the camera zoom
ye but look the video when the player are crouch for some reason the camera move back to the top if like the player was walking or smth
when the player is crouching down, out of nowhere the camera goes up as if he were not crouching or standing up
doesn't happen to me
hmm... that weird
i really don't work much with the camera zoom, but im gonna try it later
nop, normal animation
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
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
alright
sorry for bother you, and thanks for the help :D