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

Why am I getting this message in the console?

Asked by 6 years ago

"Something unexpectedly tried to set the parent of Quackshire to Playing while trying to set the parent of Quackshire. Current parent is Queue."

here's the script that's causing it but I don't know why it is. (this is in a normal script and game is FE)

if script.Parent.Match.Value == false then
    script.Parent.Match.Value = true
    for i,v in pairs(plrs) do
        v.Parent = script.Parent.Playing
        game.Workspace[v.Name]:MoveTo(script.Parent.Position)
    end
else
    return
end

also it's showing up in orange so i'm assuming it's a warning, because of it the item isn't transferring parents. why is this happening and how can I fix this?

0
You probably can't parent Players' characters to a different object than workspace. thesit123 509 — 6y
0
this is parenting a value not a player Quackshire 17 — 6y

1 answer

Log in to vote
0
Answered by
OfcPedroo 396 Moderation Voter
6 years ago
Edited 6 years ago

Since you want to edit the v variable's path, you should clone. Here, try this:

if script.Parent.Match.Value == false then
    script.Parent.Match.Value = true
    for i,v in pairs(plrs) do
        v.Parent = script.Parent.Playing
        local clone = game.Workspace[v.Name]:Clone()
        clone.Parent = script.Parent.Position
        game.Workspace[v.Name]:Destroy()
    end
else
    return
end

If this works, mark as the answer!

As always, good scripting!

0
im trying to parent a value, also the script.Parent.Playing is a folder, and so is the plrs table Quackshire 17 — 6y
0
Hmm then wait, let me edit. OfcPedroo 396 — 6y
0
Alright, should be working now. OfcPedroo 396 — 6y
0
Ok, I just updated the solution, so if you're seeing this for the first time, please reload the page. OfcPedroo 396 — 6y
View all comments (5 more)
0
still getting the error Quackshire 17 — 6y
0
What thesit123 said is true. You must've put a variable wrong, because by the error, it actually says you're trying to change the parent of the player, which you can't do. I suggest you take a look at the variable paths and make sure you didn't mistake anything. OfcPedroo 396 — 6y
0
again, this is a value, not a player. Quackshire 17 — 6y
0
no, you probably referred the value wrong... OfcPedroo 396 — 6y
0
Can you send me a pic of your explorer OfcPedroo 396 — 6y
Ad

Answer this question