Clone.CFrame doesn't move Models, only Parts

  1. I currently have a system that clones a part to a location.

  2. However when changing the part to a Model it Clones it but doesn’t change the CFrame.

  3. I have the PrimaryPart set aswell

(ENTIRE SCRIPT) LOCATED IN “ServerScriptService” V

local dFac = game:GetService("ReplicatedStorage"):WaitForChild("Factories").DefaultFactory
local part = game:GetService("Workspace"):WaitForChild("Part")
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("FactoryDS")
local Players = game:GetService("Players")
local Nodes = game:GetService("Workspace"):WaitForChild("Locations")

Players.PlayerAdded:Connect(function(player)
	local factoryLoaded = false
    for _, location in Nodes:GetChildren() do
		if not location:FindFirstChild("DefaultFactory") then
			if factoryLoaded then break end
            local success, data = pcall(function()
                return DataStore:GetAsync(tostring(player.UserId))
            end)
            if success and data and data["OwnedFactory"] then
                local LoadFac = dFac:Clone()
				LoadFac.Parent = workspace
				LoadFac.CFrame = location.CFrame
				LoadFac.Name = tostring(player.UserId)
				factoryLoaded = true
                print("FactoryPerPlayerLoaded")
            end
        end
    end
end)

(RELEVANT PART OF SCRIPT) V

local dFac = game:GetService("ReplicatedStorage"):WaitForChild("Factories").DefaultFactory

local LoadFac = dFac:Clone()
	LoadFac.Parent = workspace
	LoadFac.CFrame = location.CFrame
	LoadFac.Name = tostring(player.UserId)
	factoryLoaded = true

1 Like

Use Model:PivotTo(CFrame) to move your model to your desired CFrame

1 Like

Does this work? LoadFac:PivotTo(location.CFrame)
EDIT: It worked! ty

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.