I'm trying to make a platform that is similar to the one's in smash bros, where you can stand on it from the top, and you can go through it from the bottom (I'll worry about how to make it so you can go through from the top using S + Jump).
H o w e v e r, I HAVE ABSOLUTELY NO IDEA WHERE TO EVEN START.
I've tried making it so they lose collision when anything but the legs touch it, but players bump into it from the side with the legs only, and other plays will fall through when a player going through from the bottom, So I'm just lost.
If anyone can help, greatly appreciated.
P.S. If you're just gonna make the script, thank you, I will credit you and see how I can fuse them with my scripts (Though I doubt this will ever happen, and I also wanna learn how to do this rather than just taking a script.)
I would reccommend generating a Region3 above and below the platform that you consistently check for the character in. If a character is detected in the Region3 below the part, the platform would be made CanCollide false for them. If they were detected above, it would make the platform CanCollide true again, allowing them to stand on the platform. It would be best to do this in a local script to reduce potential delay, and so that you don't have to use collision filtering (assuming you have FilteringEnabled).
It's better to not try to solve this using collisions, because that won't really capture the "idea" of what's happening.
You want a platform that you collide with from above and that you don't collide with from below. Said another way,
This can be as simple as
-- (as a LocalScript, so that this is handled separately for each player) local player = game.Players.LocalPlayer while wait() do local above = isCharacterAbove(player.Character, platform) platform.CanCollide = above end
where isCharacterAbove
is defined appropriately. I would consider a character to be above a platform when the bottom of their feet are no more than ~ 0.5 studs into the top surface of the platform:
function isCharacterAbove(character, platform) local platformTop = (platform.CFrame * (platform.Size / 2)).y local characterHeels = character.HumanoidRootPart.Position.y - 2.35 return platformTop < characterHeels + 0.5 end