'Waist' motor6d not being detected by :WaitForChild()

I’ve been trying to create a rifle weapon, and one of the features is that the UpperTorso points towards the mouse. This works fine when I first spawn into the game(in studio), but when I respawn, the ‘Waist’ motor6d responsible for the movement is not detected by UpperTorso:WaitForChild(“Waist”)

In the output, I get “Infinite yield possible on 'lightningstrike30451.UpperTorso:WaitForChild(“Waist”),” however when I look in the explorer the waist is actually in the UpperTorso.

script:

local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
local UpperTorso = Character:WaitForChild("UpperTorso")
local Waist = UpperTorso:WaitForChild("Waist")

Any help would be appreciated

Are you using a local script? …

yes, this is used in a localscript

It is an issue with your script… maybe post the script so others can help. Usually when something doesnt work on respawn it is the scripts issue with getting the character.

I tried and have same problem but this works for me:

local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
local Waist = Character:FindFirstChild("Waist",true)

uppertorso:getchildren returns {} I don’t know why…