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

1 comment

0

Can anyone please help????