Character not loading (ive tried so much )

The character refuses to load , i keep getting errors rn the error is “infinite yield possble on combat folder” and sometimes its chraracter or humrpt is nil" and i would appreciate some help

repeat wait() until game:IsLoaded()
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	repeat wait() until player.CharacterAppearanceLoaded
	local character = player.Character or player.CharacterAdded:Wait()
	local HumanoidRootPart = character:WaitForChild("HumanoidRootPart")
	
	
	local CombatFolder = Instance.new("Folder", HumanoidRootPart)
	CombatFolder.Name = "CombatFolder"
	
	local Stunned = Instance.new("BoolValue",CombatFolder)
	Stunned.Name = "Stunned"
	Stunned.Value = false

	local CanAttack = Instance.new("BoolValue",CombatFolder)
	CanAttack.Name = "CanAttack"
	CanAttack.Value = true	
	
	
	local Combo = Instance.new("NumberValue",CombatFolder)
	Combo.Name = "Combo"
	Combo.Value = 0
	
	local ComboTime = Instance.new("IntValue",CombatFolder)
	ComboTime.Name = "ComboTime"
	ComboTime.Value = 0
	
	
	local LastHand = Instance.new("StringValue",CombatFolder)
	LastHand.Name = "LastHand"
	LastHand.Value = "Left"

	
	
end)
1 Like

try this

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	local character = player.Character or player.CharacterAdded:Wait()
	local HumanoidRootPart = character:WaitForChild("HumanoidRootPart")

	local CombatFolder = Instance.new("Folder", HumanoidRootPart)
	CombatFolder.Name = "CombatFolder"

	local Stunned = Instance.new("BoolValue",CombatFolder)
	Stunned.Name = "Stunned"
	Stunned.Value = false

	local CanAttack = Instance.new("BoolValue",CombatFolder)
	CanAttack.Name = "CanAttack"
	CanAttack.Value = true	


	local Combo = Instance.new("NumberValue",CombatFolder)
	Combo.Name = "Combo"
	Combo.Value = 0

	local ComboTime = Instance.new("IntValue",CombatFolder)
	ComboTime.Name = "ComboTime"
	ComboTime.Value = 0


	local LastHand = Instance.new("StringValue",CombatFolder)
	LastHand.Name = "LastHand"
	LastHand.Value = "Left"
end)
1 Like
repeat wait() until player.CharacterAppearanceLoaded

This line is just pointless, as CharacterApperanceLoaded is an event and not a variable indicating whether the character appearance loaded.

Additionally, check if CharacterAutoLoads is turned on under the properties of StarterGui

waht does character audo loads do? and should ihave it checked or no

It should be checked, and when unchecked it doesn’t load the character upon joining.

1 Like