local camcenter = workspace.CameraCenter -- this is a part that controls a camera
local cframe = camcenter.CFrame
local MaxIncrement = 10
local increment = 1
local uis = game:GetService("UserInputService")
uis.InputBegan:connect(function(input)
print("InputDetected")
if input.UserInputType == Enum.UserInputType.Keyboard then
print("KeyboardInputDetected")
if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.Up then
print("WUPInputDetected")
if (cframe.LookVector + Vector3.new(0, 0, increment)).Z < Vector3.new(0, 0, MaxIncrement).Z then
print("Changing")
cframe = CFrame.new(Vector3.new(0,0,0), cframe.LookVector + Vector3.new(0, 0, increment))
end
end
end
end)
I am not getting any errors. The thing is that it only works once and then it freezes.
help please

4 comments
ok, thx! ill try it.
nope, did not help, but thank you anyhow
got it! the thing is that it change it by soooo little the change was unnoticable
glad I could help