Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

a platform you can jump-thru from the bottom, but cant fall through, is this possible?

Asked by 1 year ago

I want to make a platform you can jump-thru from the bottom, but cant fall through, like in New Super Mario Bros Wii, and I've been trying some scripts and collisions for around 3 hours, and I just would like to know if this is possible without changing the players position or something along that, I've also done some researching on this, and I haven't found a solution to this yet. any help would help a lot.

0
Can you show the part of New Super Mario Bros Wii that shows exactly that? T3_MasterGamer 2189 — 1y
0
Though I am not sure if this would work, you could try using a one-sided mesh. DindinYT37 246 — 1y
0
is it a singleplayer game? non_reaI 0 — 1y

1 answer

Log in to vote
0
Answered by
blowup999 659 Moderation Voter
1 year ago

If you're doing SinglePlayer you won't need to create a new 'CollisionZone' for each player, but the CollisionZone will just be an invisible part that represents the collisionbounds for multiplayer so that all players get the same view, but have their own interaction with it, allowing multiple players to jump through it at once.

--Assumes each platform creates a new 'CollisionZone' for each player added to the game
local function setCanCollide(collisionZone, collisionZonePlayer)
    --If the player is touching it, leave it at it's current CanCollide
    for i,v in pairs(collisionZone:GetTouchingParts()) do
        if v:IsDescendantOf(collisionZonePlayer.Character) then
            return collisionZone.CanCollide
        end
    end
    --Otherwise, the player is either above or below, and set CanCollide appropriately
    return collisionZonePlayer.Character.WorldPivot.Position.Y > collisionZone.Position.Y
end
0
^ And then if you want the player to be able to fall through when they hit the down arrow or something, you just set CanCollide = false for that player's collisionZone, and it should maintain the new CanCollide as they fall through it. blowup999 659 — 1y
0
It is impossible to make the player's character's limbs since they have the Humanoid instance. T3_MasterGamer 2189 — 1y
0
Any model that has the Humanoid instance inside, it is impossible to turn off the collisions of every parts that is a child of that model. T3_MasterGamer 2189 — 1y
Ad

Answer this question