Spawning Issue: Roblox Studio

Hello. I am trying to develop a game, but when I respawn exactly 3 times, it will do something like this:
image

It really just messes up the whole game.

5 Likes

Correction: I respawn twice and it happens

2 Likes

Could you perhaps test this on a blank game and see if it has the same issue?

If it does not, it would be something in your Scripts on your main game, which might be holding-up the game’s performance.

Yeah. It only is that way for my game.

I have a few WaitForChild(s), but other than that…

Fig 2:

Its really annoying… Do I have to change my whole gam around this?

With no script, no hierarchy to look at, no video, we cannot help you. Please help us help you by posting a script that could be causing the problem.

Here is a video. I am not sure which script is causing this.

Perhaps your admin script? Does it interfere with Players spawning?

I disabled it… Same bug happens… Is this caused by lag?

Try to set the forcefield duration on the spawn location to 0.

I can do that later, but if you watch closely to the video, the inventory will disappear.
I doubt it is related to my code, but just in case…

wait(1)

local Player1 = game.Players.LocalPlayer
local Player = Player1.Name


game.Players[Player].PlayerGui.InventoryStarterGui.InventoryGui.Enabled = true

local Player2 = game.Players.LocalPlayer
local Char = Player2.Character



Char:WaitForChild("Humanoid").Died:Connect(function()
	wait()
	game.Players:FindFirstChild(Player).PlayerGui.InventoryStarterGui.InventoryGui.Enabled = true
end)

I have a blocky character script which I think is causing the issues.

local Players = game.Players

function PlayerJoined(Player)
	local function RemoveMeshes(Character)
		local Humanoid = Character:WaitForChild("Humanoid")
		wait()
		local CurrentDescription = Humanoid:GetAppliedDescription()

		CurrentDescription.Head = 0
		CurrentDescription.Torso = 0
		CurrentDescription.LeftArm = 0
		CurrentDescription.RightArm = 0
		CurrentDescription.LeftLeg = 0
		CurrentDescription.RightLeg = 0
		Humanoid:ApplyDescription(CurrentDescription)		
	end
	Player.CharacterAdded:Connect(RemoveMeshes)
end

Players.PlayerAdded:Connect(PlayerJoined)

Fixed. Just had to work around the issue.

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