How do I make a 2D platform code (From the wiki) scroll left?
So, I tried to make the 2D platform code from the wiki scroll left, but nothing is working. I don't really know what to do, but I think this block of code may help.
01 | local function onUpdate() |
02 | if player.Character and player.Character:FindFirstChild( 'Torso' ) then |
03 | local playerX = player.Character.Torso.Position.X |
04 | local cameraX = camera.CoordinateFrame.p.X |
07 | if cameraX - cameraXChase < playerX then |
08 | camera.CoordinateFrame = camera.CoordinateFrame + Vector 3. new(cameraSpeed, 0 , 0 ) |