Hi there, so I'm making a game similar to Tower Of Hell. The issue is, when I set the position of the model's PrimaryPart, it only moves the PrimaryPart, not the other items in the model. So, I used the MoveTo method on the model, but it just doesn't move. I know my Vector3 arg is right because when I'm just changing the position of the PrimaryPart, it goes to the right place.

Here's the module:

local stages = game.ServerStorage:WaitForChild("Stages"):GetChildren()

local module = {
	new = function()
		local last = workspace:WaitForChild("Spawn")
		for i = 1, 6 do
			local lpp = last.PrimaryPart
			if i == 6 then
				local endClone = game.ServerStorage:WaitForChild("End"):Clone()
				endClone.PrimaryPart.Position = Vector3.new(lpp.Position.X, lpp.Position.Y + lpp.Size.X/2 + endClone.PrimaryPart.Size.X/2, lpp.Position.Z)
				endClone.Parent = workspace
				last = endClone
			else
				local stage = stages[math.random(1, #stages)]:Clone()
				stage.PrimaryPart.Position = Vector3.new(lpp.Position.X, lpp.Position.Y + lpp.Size.X/2 + stage.PrimaryPart.Size.X/2, lpp.Position.Z)
				stage.Parent = workspace
				last = stage
			end
		end
	end
}

return module

And yes, I am requiring the module and using the "new" function. Any help is greatly appreciated!

The stages are models.

1 comment

0

Ok, so it turns out, that if you try to use :MoveTo() before parenting it to the workspace, it wont move. I recieved this tip shortly after posting here, lol