#Manipulating camera
3 messages · Page 1 of 1 (latest)
heres the code:
game.Workspace.CurrentCamera.CameraType = "Scripted"
local plr = game:GetService("Players").LocalPlayer
local UIS = game:GetService("UserInputService")
local debounce = false
local toggled = true
plr.CharacterAdded:Connect(function(char)
if debounce == false then
if toggled == true then
debounce = true
char:WaitForChild("Humanoid").CameraOffset = Vector3.new(1.5,1.5,6)
wait(1)
debounce = false
toggled = false
elseif toggled == false then
debounce = true
UIS.InputBegan:Connect(function(input, gp)
if input.KeyCode == Enum.KeyCode.T then
char:WaitForChild("Humanoid").CameraOffset = Vector3.new(-1.5,1.5,-6)
wait(1)
debounce = false
toggled = false
end
end)
end
end
end)