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

Hello, I have a infinate yeild issue on Humanoid:WaitForChild("UpperTorso")'. Help please?

Asked by 3 years ago

So I do know about properties and yeilds, however I cant find a solution to this section of my script.

local Player = game:GetService("Players").LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = char:WaitForChild("Humanoid")
local Torso = Humanoid:WaitForChild("UpperTorso")
0
Is it R15 or R6? Also try renaming the char variable since char is used for a string method. uhi_o 417 — 3y
0
R15, also when I rename the char variable, a error pops up for that. ifreakinlostmyacount 52 — 3y
0
Which is another infinate yeild as a warning ifreakinlostmyacount 52 — 3y

1 answer

Log in to vote
2
Answered by
rabbi99 714 Moderation Voter
3 years ago

There is no UpperTorso in the humanoid. You should try this:

local Player = game:GetService("Players").LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = char:WaitForChild("Humanoid")
local Torso = char:WaitForChild("UpperTorso")

We make mistakes!

0
How did I mess that up, silly me. ifreakinlostmyacount 52 — 3y
0
How did I mess that up, silly me. ifreakinlostmyacount 52 — 3y
0
How did I mess that up, silly me. ifreakinlostmyacount 52 — 3y
0
Haha! It's okay! rabbi99 714 — 3y
Ad

Answer this question