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)