Hello,
I’m facing an issue with the camera that I am unable to solve. I’ve searched high and low for results, but to no avail. Here is what’s happening:
- This video displays the camera glitch every time I press ‘Shift+C’ while moving.
Here Is My Script:
function ChangeCameraOffset(Offset)
if not char then char = plr.Character or plr.CharacterAdded:Wait() end
local Humanoid = char:WaitForChild("Humanoid")
local Tween = TweenService:Create(Humanoid, TweenInfo.new(0.1), {CameraOffset = Offset})
Tween:Play()
end
uis.InputBegan:Connect(function(input, gameProcessedEvent)
if input.KeyCode == Enum.KeyCode.C and uis:IsKeyDown(Enum.KeyCode.LeftShift) and DB == false and tick()-RollStartTime > .75 and hum.MoveDirection.Magnitude > 0 then
ChangeCameraOffset(Vector3.new(0, -2, 0))
hum.JumpPower = 0
anim:Stop()
Sliding = true
RollTrack:Play()
RollStartTime = tick()
local dirVec = workspace.CurrentCamera.CFrame.LookVector
RollDirection = (dirVec*Vector3.new(1,0,1)).unit
DB = true
RollTrack:Stop()
wait(1)
Sliding = false
ChangeCameraOffset(Vector3.new(0, 0.475, 0))
hum.JumpPower = 37
wait(1)
DB = false
end
end)
Resources: