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

Why am I getting this message in the console?

"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?

2 comments

0

You probably can't parent Players' characters to a different object than workspace.

0

this is parenting a value not a player

1 answer

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!

9 comments

0

im trying to parent a value, also the script.Parent.Playing is a folder, and so is the plrs table

0

Hmm then wait, let me edit.

0

Alright, should be working now.

0

Ok, I just updated the solution, so if you're seeing this for the first time, please reload the page.

0

still getting the error

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.

0

again, this is a value, not a player.

0

no, you probably referred the value wrong...

0

Can you send me a pic of your explorer

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