Why are the models not positioning correctly?


image

second image is what its supposed to look like but for some reason the models are being offsetted or something

The way i position the models is i just positioning a clone of the entire tycoon then setting the parent to a folder in workspace

local cloneBuild = Builds:FindFirstChild(v.Name)
cloneBuild.Parent = tycoon.BoughtItems
	local CurrentTycoon = ServerStorage.Tycoons:FindFirstChild(PlayerData.CurrentTycoon):FindFirstChild("Model"):Clone()
	CurrentTycoon.Parent = ServerStorage.Tycoons:FindFirstChild(PlayerData.CurrentTycoon)
	CurrentTycoon:PivotTo(location.CFrame)
	CurrentTycoon:SetAttribute("Owner", player.UserId)
	
	local TycoonModel = CurrentTycoon:FindFirstChild("Base"):Clone()
	TycoonModel.Parent = location
	TycoonModel:PivotTo(location.CFrame)
	location:SetAttribute("Taken", player.UserId)
	print(TycoonModel:GetPivot())
	print(CurrentTycoon:GetPivot())

both of these prints return the same value

2 Likes

Ensure you set the CFrame of the model before you set its parent. After cloning and before setting the parent, ensure that you set the position using PivotTo. If the model’s CFrame isn’t updated properly before it’s parented, it might lead to unexpected behavior.

1 Like

well theres two versions of the tycoon one for the builds and one for the already built and so i dont think your first answer might be correct but your second answer might be slightly correct still not sure though

image
the “Model” is cloned to the same parent as it is here
then inside of the model there is another model called “Base” thats the actual tycoon

1 Like

Sorry can you go more on depth of what you are trying to do? Are you like building it one by one or something? And the position are off?

1 Like

after a while i have solved it by just setting the position of the starter tycoon to 0

1 Like

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