#WallJump bug

1 messages · Page 1 of 1 (latest)

wintry elk
#

Hello everyone, I made this post for everyone to help me fix the WallJump bug in my FE2 fangame

So The bug had been occured a few days before and we still havent found any solutions to this bug

When sticking onto the walljump for around 15-20 seconds maybe? The player will be glitched and out of the lobby and just straight up having weird movements to the character

#

Anyways guys heres the script.

If anyone wanted to help me make the walljump a lil bit better then suggest some ideas!

wintry elk
#

No help? 😭

cursive terrace
#

Send the actual code

dense lily
#

and it's not flung down or you'd hit the death plane

dense lily
# wintry elk

jeez 😮‍💨 why do you have 2 connections to heartbeat...

#

well give me a min let's see if there's anywhere obvious that a truly massive amount of speed is being built up

#

well first thing lua local VelocityY = RootPart.Velocity.Y local VelocityX = RootPart.Velocity.X local VelocityZ = RootPart.Velocity.Z if VelocityY < 0 then VelocityY = -VelocityY end if VelocityX < 0 then VelocityX = -VelocityX end if VelocityZ < 0 then VelocityZ = -VelocityZ end Velocity = (VelocityY+VelocityZ+VelocityZ) not sure what this is supposed to be

#

but it's not the magnitude of the velocity

#
            local normalCFrame = hit.CFrame:ToObjectSpace(CFrame.new(Vector3.new(0, 0, 0), normal))
            normalCFrame = normalCFrame - normalCFrame.Position
            local offsetCFrame = CFrame.new((hit.CFrame:inverse() * RootPart.CFrame).Position)
            local newCFrame = hit.CFrame * offsetCFrame * normalCFrame

            RootPart.CFrame = newCFrame``` well this seems to be how you're sticking the character to the wall
#

if CurrentConstraint == nil at least there's some kind of debounce

#
            CurrentConstraint = Instance.new("BallSocketConstraint")
            CurrentConstraint.Name = "WallWeld"
            CurrentConstraint.Attachment0 = CurrentAttachment
            CurrentConstraint.Attachment1 = RootAttachment
            CurrentConstraint.Name = "WallWeld"
            CurrentConstraint.Parent = RootPart``` sooo.... character being attached to the wall twice it seems
dense lily
#

oh nvm you are setting it twice it seems ```lua
elseif CurrentConstraint ~= nil and CurrentAttachment ~= nil and currentWall then
local hit = currentWall

    local localNormal = CurrentAttachment:GetAttribute("LocalNormal")
    local localGrip = CurrentAttachment:GetAttribute("LocalGrip")

    if localNormal and localGrip then
        local worldNormal = hit.CFrame:VectorToWorldSpace(localNormal)
        local worldGrip = hit.CFrame:VectorToWorldSpace(localGrip)

        local normalCFrame = hit.CFrame:ToObjectSpace(CFrame.new(Vector3.zero, worldNormal))
        normalCFrame = normalCFrame - normalCFrame.Position

        local offsetCFrame = CFrame.new((hit.CFrame:Inverse() * RootPart.CFrame).Position)

        local newCFrame = hit.CFrame * offsetCFrame * normalCFrame

        RootPart.CFrame = newCFrame
        GripLookVector = worldGrip
    end
end``` but this shouldn't create huge speed
#
    RootPart.Velocity =
        RootPart.Velocity +
        Vector3.new(0, Humanoid.JumpPower * 1.13, 0) +
        (GripLookVector * Humanoid.JumpPower * (multi / 2.5)) +
        (GripLookVector * 28) *
        angleVec``` large speed might come from here
dense lily
#

ya i can't quite track down exactly where its coming from but you're definitely building up insane speed from something

#

with how jank this code is, it could be coming from a number of different places

#

so i suggest just taking more debugging steps and try to find where the extreme velocity is coming from

dense lily
wintry elk
cursive terrace
wintry elk