Why is my model upside-down?

Hello, I am making a minigame type of game and whenever I bring the map into the game, it spawns in upside down. Anyone know how to fix this? Thank you. Here is my current code:

local RS = game.ReplicatedStorage
local SS = game.ServerStorage
local intermission = game.StarterGui.Round.Intermission.Frame.IntermissionText
local text = game.StarterGui.Round.Intermission.Frame.TimeText.Text
local Maps = SS:WaitForChild("Maps")
local Status = RS:WaitForChild("Status")

while true do
	--intermission.Text = "Waiting for enough players! (1/2)"
	--repeat wait() until game.Players.NumPlayers >=2
	intermission.Text = "Intermission:"

	for i=1,10 do
		wait(1)
		local new = tonumber(text)-1
		text = new
	end

	local plrs = {}

	for i,player in pairs(game.Players:GetPlayers()) do
		if player then
			table.insert(plrs,player) --add plr

		end
	end
	local AvailableMaps = Maps:GetChildren()
	local ChosenMap = AvailableMaps[math.random(1,#AvailableMaps)]

	intermission.Text = ChosenMap.Name.. " chosen"

	wait(2)

	intermission.Text = "Game starting!"

	wait(2)

	local ClonedMap = ChosenMap:Clone()
	--ClonedMap:SetPrimaryPartCFrame(CFrame.new(490.263, 78.957, -4.343))
	if ClonedMap.Name == "Radioactive" then
		ClonedMap:PivotTo(CFrame.new(490.263, 79.457, -4.343))
	elseif ClonedMap.Name == "Construction" then
		ClonedMap:PivotTo(CFrame.new(490.263, 35.957, -4.343))
	end
	ClonedMap.Parent = workspace

	local SpawnPoints = workspace.Game.Stands:FindFirstChild("SpawnPoints")

	if not SpawnPoints then
		warn("No spawnpoints found")
	end

	local AvailableSpawns = SpawnPoints:GetChildren()

	for i,player in pairs(plrs) do
		if player then
			local char = player.Character

			if char then
				char:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawns[1].CFrame + Vector3.new(0,2,0)
				table.remove(AvailableSpawns,1)

				local GameTag = Instance.new("BoolValue")
				GameTag.Name = "GameTag"
				GameTag.Parent = char
			else
				if not player then
					table.remove(plrs,i)
				end
			end
		end
	end

	Status.Value = "Get ready to play!"

	for i,player in pairs(plrs) do
		if player then
			local character = player.Character

			if not character then
				print("Player left the game")
				table.remove(plrs,i)
			elseif character:FindFirstChild("GameTag") then
				print(player.Name.. " is still in the game!")
			else
				table.remove(plrs,i)
			end
			
		else table.remove(plrs,i)
			print(player.Name.. " has been removed")
			
		end
	end
	
	Status.Value = #plrs.. " remain!"
	
	if #plrs == 1 then
		Status.Value = "The winner is: " ..plrs[1].Name
		plrs[1].leaderstats.Wins.Value += 1
		break
	elseif #plrs == 0 then
		Status.Value = "Nobody won!"
		break
	end
	
	print("End of game")
	wait(2)
	
	for i,player in pairs(game.Players:GetPlayers()) do
		local charac = player.Character
		
		if not charac then
			print("Player does not have character!")
		elseif charac then
			if charac:FindFirstChild("GameTag") then
				charac.GameTag:Destroy()
			end
		end
		player:LoadCharacter()
	end
	
	ClonedMap:Destroy()
	
	Status.Value = "Game ended!"
	
	wait(2)
end

Just letting you know, this only happens with the “Radioactive” Map!

1 Like

It’s a bit strange, what I usually do is place the position and orientation inside the folder where I keep it so that it can be cloned, I use translator by the way

For example:
https://gyazo.com/56d0c1ec523ea72a96323dff64f145b1

Yes that is what I have in ServerStorage, the whole map is right side up but still it somehow flips upside down when teleporting.

Can you try reflipping it? Can you try flipping it upside down in the ServerStorage so it comes the right way when teleported to the workspace?

Tried that, still does not unflip it.

You might have changed the pivot or something, you can apply an additional offset using CFrame.Angles.

ClonedMap:PivotTo(CFrame.new(490.263, 79.457, -4.343) * CFrame.Angles(0, 0, math.pi)) -- may need to use X axis instead

PivotTo is the most reliable method of moving models. SetPrimaryPartCFrame has floating point issues and has actually been deprecated in favour of PivotTo.

2 Likes

Yeah, this is definitely a bug. Roblox doesn’t listen to these posts, so I suggest you report it as a real bug.

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