How should I do this?

Hello, I’m making a smash bro’s styled game on Roblox, in which the fighters will be based off of popular Roblox icons like Noob’s, Guest, etc.

I’m wondering how I should make it so that players can jump on top of an object above their head. How do you think I should do this?

1 Like

When a player jumps, make all the platforms uncollide-able.

1 Like

That’s not what I want though, I want it so that a platform that a player is under can be hopped onto from the bottom to the top; I want the player to be able to jump up from under a platform and be able to land on top.

So, we can detect when the player is falling down (docs), we can make all previous platforms we made unable to collide with, collide-able.

Won’t this cause problems for 2 parted platforms?; platforms in a group? and or other players?

If you want an instant jump, you can cast a ray above their head, and then if it collides with a valid platform, transform the player upwards by the distance of the ray, added by the height of the platform, and then added the height of their legs.
If you want the player to still have a jumping animation, you can do what Choco said and make the platform non-collideable, again using raycasts out of the head, but also collision with the character. If both the raycast and character don’t collide, you can make the platform collideable again.

2 Likes

Sorry, what do you mean by two parted platforms?

We can use collision groups for each player, and a group for environment.

Actually, a method that might be better is have all platforms in one collision group and make a collision group that cannot collide with the platform group, and whenever a Character jumps, it moves to the collision group that can’t touch platforms.

This is also nice because we won’t need many collision groups, and we won’t be reliant on the client to do it.

1 Like