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

The Wall Crawling Script Keep Making My Character Crawling?

Asked by
ImfaoXD 158
7 years ago

I was wondering if you guys could help me. I've tried to fix the tool called "Climb Wall" which make the character crawl on the walls. And it works just fine in ROBLOX studio but there's one problem though. When my character reach the top of the building , my character keep climbing even though there are no walls and I tested it in the actual server. Is there a way to fix this without making my character climbing on mid air?

https://gyazo.com/7330ad6b86c7834d7dcb708e049d9760

EQ = false
Mag = false
HitPart = nil
Pl = script.Parent.Parent.Parent
Char = Pl.Character
Tor = Char.Torso

script.Parent.Selected:connect(function(mouse)
EQ = true
if Tor:findFirstChild("WallClimbV") ~= nil then
Tor.WallClimbV:remove()
end
end)

script.Parent.Deselected:connect(function(mouse)
EQ = false
if Tor:findFirstChild("WallClimbV") ~= nil then
Tor.WallClimbV:remove()
end
end)

while workspace:findFirstChild(script.Parent.Parent.Parent.Name) == nil do
wait(.1)
end

Tor.Touched:connect(function(hit)
if EQ == true then
if hit.Position.y >= Char.Torso.Position.y and hit.Size.y >= Char.Torso.Size.y then
HitPart = hit
else
HitPart = nil
end
end
end)

while true do
if EQ == true then
if HitPart ~= nil then
if (HitPart.Position - Tor.Position).magnitude <= HitPart.Size.x+1.5 or (HitPart.Position - Tor.Position).magnitude <= HitPart.Size.z+1.5 then
if Tor:findFirstChild("WallClimbV") == nil then
local bv = Instance.new("BodyVelocity")
bv.Parent = Tor
bv.Name = "WallClimbV"
bv.velocity = Vector3.new(0,Char.Humanoid.WalkSpeed,0)
bv.maxForce = Vector3.new(999999999999,999999999999,999999999999)
end
else
if Tor:findFirstChild("WallClimbV") ~= nil then
Tor.WallClimbV:remove()
end
HitPart = nil
end
else
if Tor:findFirstChild("WallClimbV") ~= nil then
Tor.WallClimbV:remove()
end
HitPart = nil
end
end
wait(.05)
end 

If you need the tool and test it out here's the link to the tool:

https://www.roblox.com/library/722643436/Wall-Crawling-Tool-Need-Help

Many thanks, my friends!

0
try math.huge; local mhuge = math.huge , bv.MaxForce = Vector3.new(mhuge,mhuge,mhuge)? abnotaddable 920 — 7y
0
error on line 28; no inequality confirmed to be equal or over WBlair 35 — 5y

Answer this question