Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a 2D platform code (From the wiki) scroll left?

Asked by 8 years ago

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.

local function onUpdate()
    if player.Character and player.Character:FindFirstChild('Torso') then
        local playerX = player.Character.Torso.Position.X
        local cameraX = camera.CoordinateFrame.p.X


        if cameraX - cameraXChase < playerX then
            camera.CoordinateFrame = camera.CoordinateFrame + Vector3.new(cameraSpeed, 0, 0)
        end
    end
end

0
Can anyone please help???? kamoojan 10 — 8y

Answer this question