Switch between frames

im trying to make it so when you press the B button it switches the player frame
(one frame is black and one is white) and it just cycles everytime you press it and i cant get anything to work

Could you share any of your code or explain a bit more what you have tried to do?

Pressing the B button will call the cancel event on the player, so in your player script you'll want to add the cancel event like this:

on cancel do
  // code to run on pressing B goes here
end

If you want the player to change appearance, first you could try making a new player tile on the player tab. Then in the above event you can use swap to change the player's tile, like this:

on cancel do
  swap "player tile name"
end

Hope that helps!

im trying to make it so the B button switches to the next frame on the player

Ok so you want to do something similar but use frame instead of swap

Make sure your player tile is set to 0 fps also, you can only manually change frame on tiles set to 0 fps.