Character rotates with mouse in-game but not in studio

Whoa that’s a smooth like butter camera
Did you check your game settings?

As i already said, i checked every game setting and tried turning off shiftlock and etc. Even after disabling the custom camera the issue persists.

Do you mind sharing the lines of code in the localscript where the input begins? If the server gives the player that localscript using the PlayerAdded event, a lot of times, starting a test in studio will load you in before that can fire!

Ok i dont really understand, you want to see the UIS input began function or?

If you could do that, and also explain either how the script gets parented to the player, or if it’s a Starter script!

Alright, so basically i use a module for my camera: Over-The-Shoulder Camera System
I also use a custom character loading function (so i can easily swap characters)
On loading a character, i do a loop, to clone everything from StarterCharacterScript to this new character.

When you load the character the first time, are you relying on

game.Players.PlayerAdded:Connect()

Yes, it basically goes like this:

Players.PlayerAdded:Connect(function(player)
  LoadChar(player, newCharacter)
end)

What happens to the studio glitch if you try this?

local players = {} -- master table, our count of all players

Players.PlayerAdded:Connect(function(player)
  table.insert(players,player.Name) -- player joined, add to accountability table
  LoadChar(player, newCharacter)
end)

Players.PlayerRemoving:Connect(function(player) -- this removes accounted for players
  local finds = table.find(players,player.Name) or nil
  if finds then
    table.remove(players,finds)
  end
end)

while #Players:GetChildren() ~= #players and #players == 0 do -- this adds player to master table if they load in early or there's an error
  task.wait()
  local ready = next(Players:GetChildren()) or nil
  if ready then 
    for x, player in ipairs(Players:GetChildren()) do
      table.insert(players,player.Name)
      LoadChar(player, newCharacter)
    end
  end
end

This might help!

Hey, the issue still persists in-game.
I really dont know whats causing it, since yesterday when i playtested, it was fine.
Also, the camera module is in StarterPlayerScripts since i need to load the player settings, when they get teleported from the main place.

do you mind printing when the cameramodule starts user input? You could keep moving the print() up each block until it outputs to find out what’s going on that way!

The camera module starts user input as soon, as i enable it on the client side with the :Enable() function.

I’m assuming the Enable function is called within the LoadChar function? edit woops that was server side lol

The LoadChar function is on the serverside. While the enable function is on the clientside. It fires as soon as the script runs.

Its a bug I believe

That talks about studio permanent shiftlock, while that doesnt happen to me in studio. Instead it happens in the game itself.

Oops sorry, didnt read it fully. I’ll try to fix it and see if it works.

TBH I misread too I was working the opposite trying to fix studio and not in-game… aaaaaaa

Ok so, either im dumb or not.
Locking the camera setting at Classic fixes the bug now.
When i tried it earlier today it didnt work.
Thanks to everyone trying to help!! :grinning:

1 Like

Ok, after getting this bug again i researched and found out about UserGameSettings.RotationType.
Setting that to Enum.RotationType.MovementRelative fixed it.