help me to create a rotating platform

hi everyone i am new to coding and i created a 2d platform which rotates and it worked but the problem is when player stands in the platform the player cant jump but if he stands in a normal platform he can jump i will attach my code please help me

MOVEMENT CODE

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;

public class BlueMovements : MonoBehaviour {

Rigidbody2D rb;
float dirX;

// [SerializeField]
// GameObject coinMagnet;

[SerializeField]
float moveSpeed = 5f, jumpForce = 600f, bulletSpeed = 400f;

bool facingRight = true;
Vector3 localScale;

// public Transform barrel;
// public Rigidbody2D bullet;

bool doubleJumpAllowed = false;
bool onTheGround = false;





// Use this for initialization
void Start()
{
    localScale = transform.localScale;
    rb = GetComponent<Rigidbody2D>();
   
}

// Update is called once per frame
void Update()
{

  //  coinMagnet.transform.position = new Vector2(transform.position.x, transform.position.y);
    if (rb.velocity.y == 0)
        onTheGround = true;
    else
        onTheGround = false;

    if (onTheGround)
        doubleJumpAllowed = true;

    dirX = CrossPlatformInputManager.GetAxis("Horizontal");

    if (onTheGround && CrossPlatformInputManager.GetButtonDown("Jump"))

    {
        Jump();
    }
 //   else if (doubleJumpAllowed && CrossPlatformInputManager.GetButtonDown("Jump"))

  //  {
    //    Jump();
    //    doubleJumpAllowed = false;
  //  }

 //   if (CrossPlatformInputManager.GetButtonDown("Fire1"))
       // Fire();
}

void FixedUpdate()
{
    rb.velocity = new Vector2(dirX * moveSpeed, rb.velocity.y);
}

void LateUpdate()
{
    CheckWhereToFace();
       
}

void CheckWhereToFace()
{
    if (dirX > 0)
        facingRight = true;
    else
        if (dirX < 0)
        facingRight = false;
    if (((facingRight) && (localScale.x < 0)) || ((!facingRight) && (localScale.x > 0)))
        localScale.x *= -1;
    transform.localScale = localScale;
}

void Jump()
{
    if (rb.velocity.y == 0)
  //  rb.velocity = new Vector2(rb.velocity.x, 0f); ;
    rb.AddForce(Vector2.up * jumpForce);
}

}

PLATFORM CODE

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Cloud : MonoBehaviour {

public float moveSpeed = 3f;


// Update is called once per frame
void Update () {
   
    transform.Rotate(0,0, moveSpeed);

     }

}

Could be that standing on a rotating platform is causing small jitter in the Y-velocity of your player, in turn making jumping impossible because.
You should make the onTheGround bool public and check it in the inspector if it’s ticked or not when you’re standing on a rotating platform.

You should probably also try and create a better GroundCheck system, such as explained here: Double Jumping & Finding The Ground - Unity 2D Platformer Tutorial - Part 2 - YouTube (note that this is just one way of many to create a ground check). Just looking at the player Y-velocity is not a very foolproof way of figuring out if he’s grounded or not.

EDIT: Just realized you’re rotating the platform in Z axis on a 2D field, and standing on it means your character is moving up/down constantly. So it might not be just a “small jitter” that’s causing it, but your character is constantly moving up or down while standing on the platform.