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

why is show_room model not copying?

i ma trying to make it so that when the player spawns show room model will copy and move

local show_room = script.Parent
local copy = show_room:Clone()

function new_child(child)
	if child.p_or_o.Value == "player" then
		copy:MoveTo(Vector3.new(show_room.camera_part.Position.X + 10))
		copy.Name = child.Name .. "'s spawn"
	end
end

game.Workspace.ChildAdded:Connect(new_child)

1 comment

0

I believe ChildAdded is deprecated consider changing it.

1 answer

✓ Accepted answer

You forgot to parent it to the thing you want it to be in. All you have to do is write on line 2.

Replace the code with line 2

local copy = show_room:Clone().Parent = workspace -- where you want it to clone

If my answer helped, make sure to upvote and accept

##~JesseSong

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