3 Replies
What’s not working about it - a more detailed description of the issue might be able to aid us more to help!
the code looks correct but there are a few common issuese that could prevent it from working, make sure your gameobject ahs a rigidbody component attached since the script requires it. check that your gameobject is not a child of another object that might be interfering with movement. verify that the ground check is working properly by ensuring there's actually ground beneath your object and the ground has a collider. make sure your gameobject's transform is not frozen or constrained in any way. the most likely issue is that the rigidbody component is missing or not properly configured, so double-check that it's attached and not set to kinematic mode
got it but now it seems that the player falls through everything