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)
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