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

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

Asked by
Choobu 59
5 years 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 1388 — 5y
0
Ok Choobu 59 — 5y
0
You’ve misspelled “Kurumig” (Kurumi) in the first line. Likely_Lad 4 — 5y
0
do starmaq 1290 — 5y
View all comments (4 more)
0
game.Workspace.Extrastuff:WaitForChild("Kurumig").Handle starmaq 1290 — 5y
0
if im not wrong it will not error like and it will not work until Kurumig exists starmaq 1290 — 5y
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 1290 — 5y
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 233 — 5y

1 answer

Log in to vote
0
Answered by 5 years 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
Ad

Answer this question