ENTIRE Map Being Mysteriously Shifted Causing Issues

Over the last few months, I have noticed people have been reporting that boss fights in my game have not been respawning. After further investigation, I found out that the entire map was mysteriously shifted off-center causing the boss fights and other important parts to spawn away from where they are supposed to be. To make things worse, I am unable to replicate this issues myself and players would sometimes get stuck in an infinite death loop because of the map shifting. I’m trying to figure out a way to stop the map from being shifted, but I have no idea how it could be happening (my best guess is exploiters). I’ve searched through several DevForum articles relating to anchored parts moving, but none of it seemed to be relevant to the issue I had with TONS of anchored parts (that aren’t even grouped together) being moved without any script telling it to do so.

Any ideas/suggestions on how this might be happening or a way to shift back all the parts in the map to the original position is appreciated!

Here is the death/respawn script for the boss:

local furious = false
local alldestroyed = false
local dead = false

script.Parent.Humanoid.Changed:Connect(function()
	if script.Parent.Humanoid.Health <= script.Parent.Humanoid.MaxHealth / 2 and furious == false then
		furious = true
		game.ReplicatedStorage.WranglerFurious:FireAllClients()
		game.ServerStorage.SpeedSparks:Clone().Parent = script.Parent.Torso
		script.Parent.Head.Eye.Effects.Enabled = true
		script.Parent.Head.Eye.Eye.Enabled = true
		script.Parent.Head.Eye2.Effects.Enabled = true
		script.Parent.Head.Eye2.Eye.Enabled = true
	
	elseif script.Parent.Humanoid.Health <= 0 and dead == false then
		dead = true
		game.ReplicatedStorage.WranglerRocks.Parent = workspace
		game.ReplicatedStorage.WranglerDefeated:FireAllClients()
		script.Parent.Humanoid:LoadAnimation(script:WaitForChild("Death")):Play(0,1,0.50)
		script.Parent.Torso["Boss Defeat"]:Play()
		wait(2)
		script.Parent.Head.Eye.Effects.Enabled = false
		script.Parent.Head.Eye.Eye.Enabled = false
		script.Parent.Head.Eye2.Effects.Enabled = false
		script.Parent.Head.Eye2.Eye.Enabled = false
		for i = 1, 10 do
			for i, v in pairs(script.Parent:GetChildren()) do
				if v:IsA("BasePart") then
					v.Transparency += 0.1
					if v:FindFirstChild("Face") then
						v.Face.Transparency += 0.1
					end
				end
			end
			wait(0.1)	
		end
		local s = game.ServerStorage.FuryGloves:Clone()
		s.Parent = workspace
		s.gloveleft.Position = workspace.TheWrangler.Head.Position
		s.glove.Position = workspace.TheWrangler.Head.Position
		wait(60)
		for i, v in pairs(game.Players:GetChildren()) do
			if v:FindFirstChild("Wrangler") then
				v.Wrangler:Destroy()
				v.Character:MoveTo(workspace.WranglerEnd.Position)
			end
		end
		workspace.BossIndicators.WranglerParti.Value = 0
		workspace.FuryGloves:Destroy()
		game.ServerStorage["TheWrangler"]:Clone().Parent = workspace
		game.ReplicatedStorage.RespawnWrangler:FireAllClients()
		workspace.WranglerRocks.Parent = game.ReplicatedStorage
		script.Parent:Destroy()
	end
end)


script.Parent.ChildRemoved:Connect(function(child)
	if child.Name == "HumanoidRootPart" then
		for i, v in pairs(game.Players:GetChildren()) do
			if v:FindFirstChild("Wrangler") then
				v.Wrangler:Destroy()
				v.Character:MoveTo(workspace.WranglerEnd.Position)
			end
		end
		workspace.BossIndicators.WranglerParti.Value = 0
		print("BOSS REMOVED WHEN ITS NOT SUPPOSED TO BE")
		if workspace:FindFirstChild("FuryGloves") then
			workspace.FuryGloves:Destroy()
		end
		game.ServerStorage["TheWrangler"]:Clone().Parent = workspace
		if workspace:FindFirstChild("WranglerRocks") then
			workspace.WranglerRocks.Parent = game.ReplicatedStorage
		end
		game.ServerStorage.EmergencyShutdown:Fire(script.Parent.Name)
	end
end)

This is where the boss fight is supposed to respawn:

This is where the boss fight ends up respawning (screenshot submitted by a player):

This is the infinite death loop some players get into (screenshot submitted by a player):
image

3 Likes

When you spawn the boss, are you positioning them using .CFrame or .Position? I know you said the whole map is shifting but I’ve had that issue enough times recently that I just want to make sure, and I don’t see any positioning being done in the script. Is it because they’re already in position for the original map location?

Thanks for the reply, and yes. The script doesn’t set the position, the boss is pre-set in the position it’s supposed to spawn in game.ServerStorage.

1 Like

That’s very weird, then, when did the map start shifting? Any scripts you suspect might be causing that part, or just the boss script?

I don’t have an exact date on when this started happening, but it’s been occurring in public servers for more than a month or two now (and ONLY in public servers). I’m not sure what scripts (if any at all) could be causing such a random issue. My highest suspicion is currently on scripts that use MoveTo() a lot, but even then, it makes no sense for the entire map to be moved since the parts are not grouped together and MoveTo() is never used on this boss. I could try doing a little digging through scripts when I get the chance and share those, but for now I’m leaning towards the assumption of exploiters.

1 Like

I don’t know what else it’d be besides exploiters, but they can’t move an entire map for everyone unless there’s some sort of backdoor to do so or they have a server sided injector, so if you want a temporary fix, move the boss’s primary part.CFrame to a spawn location for it’s cframe, and then keep searching for any cause of the map shifting. I think that part would be mainly just intensive research on your side since you’re the one with access to the whole game and all that.

I might try that temporary fix, but it would be a tedious process considering I would have to replicate that for every single object in game.ServerStorage that is cloned to workspace in a pre-set position. I’m a bit reluctant to blame the scripts for the map shift however since 1000+ parts moving without any command to do so is virtually impossible.

1 Like

After very intense research, I discovered the reason for the map shifting was not exploiters… but my own script. There was a script that called MoveTo() on workspace when an object that touched it wasn’t grouped.

1 Like

Ohhhh, was it something like touchedPart.Parent:MoveTo() and that happened to be workspace?
I’m glad you figured it out! Always make sure you add checks like touchedPart.Parent:IsA(“Model”) or touchedPart.Parent:IsA(“BasePart”)

1 Like

Yup, that was exactly it. I added a line to make sure what touched it isn’t directly parented to game.Workspace to make sure this doesn’t happen again. Thank you for your support in this issue.

1 Like

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