Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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)

8 comments

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.

0

Ok

0

You’ve misspelled “Kurumig” (Kurumi) in the first line.

0

do

0

game.Workspace.Extrastuff:WaitForChild("Kurumig").Handle

0

if im not wrong it will not error like and it will not work until Kurumig exists

0

now this actually may yield infinitly so you can use WaitForChild's second argument which probarly prevents it from yielding :WaitForChild("Kurumig", 1)

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

1 answer

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.