Still have questions? Join our Discord server and get real time help.
Log in to vote
0

# What does it means by the Model isnt a valid member of the folder, help please?

Asked by
Choobu 18
2 months ago

Heres the error: Kurumig is not a valid member of Folder.

I tried everything I could to fix it as in removing Kurumig(a model with parts inside it) from the folder and then deleting the folder, but it still never worked.

game:GetService("ReplicatedStorage").Kurumi.HealEvent.OnServerEvent:Connect(function(plr, m)

local heal = game.Workspace.Extrastuff.Kurumig.Handle:Clone() ------error right here
heal.Parent = game.Workspace
heal:SetPrimaryPartCFrame(plr.Character.RightHand.CFrame)
heal.PrimaryPart.Anchored = false

local JointType = "Weld"

local NewWeld = Instance.new(JointType)
NewWeld.Part0  = plr.Character.RightHand
NewWeld.Part1  = heal.Handle
NewWeld.C0     = CFrame.new();
NewWeld.C1     = heal.Handle.CFrame:toObjectSpace(plr.Character.RightHand.CFrame);
NewWeld.Parent = plr.Character.RightHand
wait(2.834)

heal:Destroy()
end)

0
It means 'Kurumig' isn't a child of 'Extrastuff'. Make sure your object names in the hierarchy are correct and match to the path on that line. xPolarium 1337 — 2mo
0
Ok Choobu 18 — 2mo
0
You’ve misspelled “Kurumig” (Kurumi) in the first line. Likely_Lad 4 — 2mo
0
do starmaq 566 — 2mo
View all comments (4 more)
0
game.Workspace.Extrastuff:WaitForChild("Kurumig").Handle starmaq 566 — 2mo
0
if im not wrong it will not error like and it will not work until Kurumig exists starmaq 566 — 2mo
0
now this actually may yield infinitly so you can use WaitForChild's second argument which probarly prevents it from yielding :WaitForChild("Kurumig", 1) starmaq 566 — 2mo
0
starmaq i learnt i can use the second parameter, u probs helped me more than you helped Choobu, thank you a lot. I always wondered why my script would give me the Infinity Yield error. Im shocked :D TheOnlySmarts 155 — 2mo

### 1 answer

Log in to vote
0
Answered by 2 months ago

If there indeed is a child in the Workspace named Kurumig, then use WaitForChild() like @starmaq mentioned:

local kuru = game.Workspace.Extrastuff:WaitForChild("Kurumig", 1) -- Using the second parameter to set the waiting time can ward off infinite yield