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

Why does RootJoint only exist on a local server/client setup?

Asked by 6 years ago

I've been working on a script that interacts with the child 'RootJoint' of HumanoidRootPart but it doesn't exist if I play through the studio or through Roblox Play. The only time it is available/even exists is if I run it through the local server test ("TEST" tab then starting a session with a local server under "Clients and Servers"). I've been trying to figure it out but honestly it doesn't make any sense to me.

character=player.Character
char.character=character
character.DescendantAdded:connect(dealwithit)
local descendants=getdescendants(character)
for i=1,#descendants do
        dealwithit(descendants[i])
end

player:ClearCharacterAppearance()

char.distance=0
nextstep=0
char.velocity=nv
char.speed=0
velocityspring.t=nv
velocityspring.p=nv
speedspring.t=0
speedspring.p=0

humanoid=wfc(character,"Humanoid");char.humanoid=humanoid
rootpart=wfc(character,"HumanoidRootPart");char.rootpart=rootpart
rootjoint=wfc(rootpart,"RootJoint")

When running the code (through anything other than the local server/client) I get the warning in the output "Infinite yield possible on 'Workspace.LiquidStudios.HumanoidRootPart:WaitForChild("RootJoint")'

I would list what I've done to try to fix the problem but I can't think of anything that would be causing this but I have been searching for the past day but haven't had any luck.

Answer this question