What do you think of what i just created?

local pathfindingService = game:GetService(“PathfindingService”)

local humanoid = script.Parent.Humanoid
local body = script.Parent:FindFirstChild(“HumanoidRootPart”) or script.Parent:FindFirstChild(“Torso”)
local destination = game.Workspace.endingPart.Position

local path = pathfindingService:CreatePath()

path:ComputeAsync(body.Position, destination)

local Waypoints = path:GetWaypoints()
for _, Waypoint in pairs(Waypoints) do
if Waypoint.Action == Enum.PathWaypointAction.Jump then
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
else
local Part = Instance.new(“Part”)
Part.Shape = “Ball”
Part.Size = Vector3.new(5,5,5)
Part.Parent = game.Workspace
Part.Anchored = true
Part.CanCollide = false
Part.Transparency = 0
local TouchingParts = Part:GetTouchingParts()
local function ClimbTruss(Truss)
if Truss then
humanoid:MoveTo(Truss.Position + Vector3.new(0,0,0))
humanoid.MoveToFinished:Wait()
end
end
for _, v in pairs(TouchingParts) do
if v:IsA(“TrussPart”) then
ClimbTruss(v)
Part:Destroy()
break
end
end
end
humanoid:MoveTo(Waypoint.Position)
humanoid.MoveToFinished:Wait()
end

I didn’t make the script. I just mashed up two different scripts into one. I don’t know what I was doing I was just expecting something to happen.

3 Likes

it still cant climb but ya… i am trying to find video but the one i found said it won’t leak it. so ya i am basically stuck trying to find something.

1 Like

Please format your code so it’s readable, it’s incredibly difficult to see what it’s actually supposed to do. And if you really want feedback, you should showcase it somehow, otherwise it’s a code review and not a showcase.

I know what you were aiming for, but there’s not much to be said other than “cool if it works.”

For the

humanoid: MoveTo(Truss.Position + Vector3.new(0,0,0))

There is no point adding the vector3. To shorten it a little temove the uneccecary vector3 statement and just have

humanoid: MoveTo(Truss.Position)

Its much more simpler. If it works tell me.
Nice code btw.

As an amateur scripter, it’s pretty hard to tell. Could you post a video or explain it further to me?

1 Like

Im amateur too lol. But do you understand my reply? Fo you think the vector 3 is unececarry?