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

How do I resize the HumanoidRootPart? [Solved]

Asked by 3 years ago
Edited by JesseSong 3 years ago

I have created a crawl script to make the character crawl through an opening. I created this localscript parented to StarterCharacterScripts.

01local UserInputService = game:GetService("UserInputService")
02local Character = script.Parent
03local Humanoid = Character:WaitForChild("Humanoid")
04local Anim = Humanoid:LoadAnimation(script:WaitForChild("CrawlAnim"))
05local AlreadyPlaying = false
06Humanoid.Running:Connect(function(Speed)
07    if Speed>0 then
08        Anim:AdjustSpeed(1)
09    elseif Speed==0 then
10        Anim:AdjustSpeed(0)
11    else
12        Anim:AdjustSpeed(-1)
13    end
14end)
15 
View all 32 lines...

The problem is that the HumanoidRootPart is blocking the way. Like this. I tried Adding this code to line 5:

1coroutine.resume(coroutine.create(function()
2    while wait() do
3        local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
4        local UpperTorso = Character:WaitForChild("UpperTorso")
5        HumanoidRootPart.Position = UpperTorso.Position
6        HumanoidRootPart.Orientation = UpperTorso.Orientation
7        HumanoidRootPart.Size = UpperTorso.Size
8    end
9end))

Then the character starts going like crazy. How do I fix this?

0
Have you tried setting CanCollide false when crawling? MarkedTomato 810 — 3y
0
Yay It worked! sidb0102 17 — 3y

Answer this question