The <> keys in my game are not working?!

I am making a Difficulty Chart Obby (DCO) and the <>/,. keys are not working. You would normally use these keys to wall hop but for some reason, they are not working in ONLY MY GAME. They move your camera 45 degrees I think either way and I have wall hops in my game and you need those keys to complete them.

I have heard that this problem might occur with discord overlays but I have turned all that off and still no luck. I think it has to do something with Roblox or Roblox Studio.

If you have this problem or have a solution please reply because I want my game to work. Any reply is appreciated! :slight_smile:

It’s because their functionality is deprecated. You can use Camera:PanUnits() but it may stop working in the future at any time as the method is deprecated and won’t be updated.

https://developer.roblox.com/en-us/api-reference/function/Camera/PanUnits

Is there a more reliable way and maybe can you give me a script that I can use for it?

Yes, you could make your own function that rounds up/down to the nearest 45º angle.

I can’t give you a full script as the function is essentially the entire script. You would have to use UserInputService to monitor the input, if the input’s KeyCode is Comma then round down to the closest 45º, if period then round up to the nearest 45º.

Sorry, I am a new scripter (started in 2020) and I want it to go side to side for wall hops and such. I have no idea what you are talking about in the rest. lol

Use UserInputService’s .InputBegan event to see whether they input’s KeyCode is comma or period, then call your respective rounding function.

https://developer.roblox.com/en-us/api-reference/event/UserInputService/InputBegan

Do you know where I can put this script if I made it?

Probably in StarterPlayerScripts.

This was the solution in a way but I made my own script in StarterGUI. I figured out how to change the camera from the article you posted.

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()

local char = player.Character

local h = char:WaitForChild(“Humanoid”)

mouse.KeyUp:connect(function(key)

if key == “,” then

workspace.CurrentCamera:PanUnits(1) – 45 degrees

end

if key == “.” then

workspace.CurrentCamera:PanUnits(-1) – 45 degrees

end

end)

This script works and I will now be using it for my game!