local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")

local UpperTorso = Character:WaitForChild("UpperTorso")
local UIS = game:GetService("UserInputService")
local HRP = Character:WaitForChild("HumanoidRootPart")

local IgnoreList = {}
for i,v in ipairs(Character:GetChildren()) do
    table.insert(IgnoreList, v)
end

UIS.InputEnded:Connect(function(Input, GP)
    Humanoid.Jumping:Connect(function(IsJumplng)
        if not GP then
            if Input.KeyCode == Enum.KeyCode.Space or IsJumplng then
                local RayC = Ray.new(UpperTorso.Position, Vector3.new(0,0,5))
                    local hit,position = game.Workspace:FindPartOnRayWithIgnoreList(RayC, {IgnoreList})
                        if hit then
                            print("CanWallJump")

                end
            end
        end
    end)
end)

The output error is "Unable to cast value to objects." How do I fix this?

5 comments

0

Hello there, i cant understand ur script very well, could u put it in code block? U can do it by selecting ur script and clicking the lua icon :)

0

Actually, im not sure this will work, but only use humanoid root part, because u want to move all the parts of the character in the wall jump right?

0

Yeah

0

Then delete UpperTorso value, and try it

0

Also replace the lines that you used UIS (ur UpperTorso value) and instead use HRP (ur HumanoidRootPart value)