Players Disintegrating Problem

Hello, currently I’m trying to make a round system and whenever it to the main round all the players disappear but their models are in the folder still. Additionally, the island has a weird mirage effect afterward. I have no idea what’s happening.

round system:

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

while true do
	repeat wait() until #Players:GetPlayers() >= 2
	for i = 5, 0, -1 do
		print(i)
		wait(1)
	end
	for _, player in ipairs(Players:GetPlayers()) do
		player.Character.RagdollTrigger.Value = true
		player.Character.Parent = workspace.InGame
	end
	task.wait(1)
	for i = 120, 0, -1 do
		if #workspace.InGame:GetChildren() <= 1 then
			break
		end
		print(i)
		wait(1)
	end
	
	if #workspace.InGame:GetChildren() <= 1 then
		local winner = workspace.InGame:GetChildren()[1]
		local winnerPlayer = Players:GetPlayerFromCharacter(winner)
		print(winner.Name)
	end
	
	for _, player in ipairs(Players:GetPlayers()) do
		player.Character.Parent = workspace
		player:LoadCharacterAsync()
	end
	
	wait(1)
end

and here’s the hitbox (I think this is the problem :person_shrugging:)

local Players = game:GetService("Players")
local Debris = game:GetService("Debris")

local hitbox = script.Parent
local FLING_POWER = 2
local UPWARD_POWER = 2
local COOLDOWN = 1

local lastHit = {}

hitbox.Touched:Connect(function(hit)
	local character = hit:FindFirstAncestorOfClass("Model")
	if not character then return end

	local humanoid = character:FindFirstChild("Humanoid")
	local root = character:FindFirstChild("HumanoidRootPart")
	if not humanoid or not root then return end

	local player = Players:GetPlayerFromCharacter(character)
	if not player then return end

	-- per-player debounce
	if lastHit[player] and os.clock() - lastHit[player] < COOLDOWN then
		return
	end
	lastHit[player] = os.clock()

	-- direction away from hitbox
	local direction = (root.Position - hitbox.Position).Unit

	local attachment = Instance.new("Attachment")
	attachment.Parent = root

	local velocity = Instance.new("LinearVelocity")
	velocity.Attachment0 = attachment
	velocity.MaxForce = math.huge
	velocity.VectorVelocity = (direction * FLING_POWER) + Vector3.new(0, UPWARD_POWER, 0)
	velocity.RelativeTo = Enum.ActuatorRelativeTo.World
	velocity.Parent = root

	Debris:AddItem(velocity, 0.25)
	Debris:AddItem(attachment, 0.25)
end)

video

Is the island becomes unanchored when round starting or streaming radius issue? It could be a problem

No the island isnt unachored you can see through the server window. Streaming radius isn’t the problem its at normal values I think.

the characters aren’t disappearing I think they’re just being replaced LoadCharacter() destroys the old model and creates a new one Instead of reparenting manually just call LoadCharacter() at the start of the round
image

all I had to do was add a wait time after teleporting characters to my map then enable ragdoll after one second. lol

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