#Turn any Part into a Climbable Ladder!

1 messages · Page 1 of 1 (latest)

wind coral
#

Instead of using a truss and clipping it inside the part. Each part get's divided into segments with the gap of 1 stud. Then I need to create a clone of the part but make it's Scale.Y small and it's Scale.X and Scale.Z to be slightly larger to make it climbable. The problem is I only have the analogy to how it could be done but got no clue on how to actually script it. It's only my 5th day in Roblox Studio so I'm still a beginner.

I tried to do this and ended up with this script but this just froze and crashed the Studio..

local boxes = script.Parent:GetChildren()
for _, box in ipairs(boxes) do
    if box:IsA("Model") then
        local parts = box:GetChildren()
        for _, stone in ipairs(parts) do
            if stone:IsA("Part") and stone.Material == Enum.Material.Rock then
                task.wait(0.1)
                local distanceY = math.floor(stone.Size.Y)
                
                local segments = distanceY / 2
                
                for i = 1, segments do
                    local topPosition = distanceY - (distanceY / 2)
                    local slab = stone:Clone()
                    slab.Size = Vector3.new(stone.Size.X, 1, stone.Size.Z)
                    slab.Position = Vector3.new(stone.Position.X, topPosition - i * segments , stone.Position.Z)
                    slab.Anchored = true
                    
                    slab.Parent = stone
                end
            end
        end
    end
end
jolly whale
#

just make an invisible truss

#

not bad for a 5th day tho

wind coral
#

anyways i got it working

#

the part acts like a ladder so i can climb any part now

silver hawk
#

memory usage 📈

wind coral
#

absolute nuts

tribal jungle
# wind coral absolute nuts

If you wanted to, you could copy the ladders and paste them in, instead of having to generate them every single time

#

When the game is running you can copy them, and once it ends you can paste them into workspace if you want, it would make things easier and more efficient

wind coral
#

if i only generate the ladder upon player touch would it make it better

tribal jungle
tribal jungle
wind coral
tribal jungle
#

I understand now mb

#

Do you have anything else that needs to be fixed

wind coral
#

yes

#

it's a different problem

tribal jungle
#

Wha

wind coral
#

the rope (part) is not smoothly attached to player's arm

#

it's not a beam nor rope constraint

tribal jungle
wind coral
#

mechanic that i'm working on requires it to be a part

#

also, i did try beam

#

it was still laggy

tribal jungle
wind coral
#

server

tribal jungle
#

Try it on client

wind coral
#

it was laggy on client

tribal jungle
#

Ohoohohohh

#

Ok

wind coral
#

created and positioned through server

tribal jungle
#

Did you try to create and pos on client?

wind coral
#

i did try SetNetworkOwner(player)

wind coral
#

so do i make the server rope transparent for player and clone and create new on server and make That visible?

#

?

#

or is there a better way

tribal jungle
#

Idk what it would be tho