--// SERVICES
local Players = game:GetService("Players")
--// FUNCTIONS
local function SetCharacterToR15(Player)
-- Ensure the player's character spawns with R15 rig
local humanoidDescription = Instance.new("HumanoidDescription")
humanoidDescription.RigType = Enum.HumanoidRigType.R15
Player:LoadCharacterWithHumanoidDescription(humanoidDescription)
end
local function PlayerAdded(Player)
-- Set the player's character to R15 when they join
Player.CharacterAutoLoads = false -- Disable auto-spawn to control the rig
SetCharacterToR15(Player)
-- Handle character customization after spawn
Player.CharacterAdded:Connect(function(Char)
local Hum = Char:WaitForChild("Humanoid")
if Player.Name:lower() == "jerold09362" then
print("Jerold spawned with R15.")
else
local Description = Hum:GetAppliedDescription()
if Description then
-- Customize character appearance (e.g., removing body parts)
Description.Head = 0
Description.Torso = 0
Description.LeftArm = 0
Description.RightArm = 0
Description.LeftLeg = 0
Description.RightLeg = 0
Hum:ApplyDescription(Description)
else
warn("Failed to get description for", Player.Name)
end
end
end)
end
--// EVENTS/CALLS
Players.PlayerAdded:Connect(PlayerAdded)
--// SERVICES
local Players = game:GetService("Players")
--// FUNCTIONS
local function CustomizeCharacterAppearance(Humanoid, PlayerName)
-- Customize character appearance
local Description = Humanoid:GetAppliedDescription()
if Description then
if PlayerName:lower() == "jerold09362" then
print("Jerold spawned with R15.")
else
-- Example: Resetting certain parts of the description
Description.Head = 0
Description.Torso = 0
Description.LeftArm = 0
Description.RightArm = 0
Description.LeftLeg = 0
Description.RightLeg = 0
-- Apply the customized description
Humanoid:ApplyDescription(Description)
end
else
warn("Failed to get description for", PlayerName)
end
end
local function SetCharacterToR15(Player)
-- Force the player's character to spawn with R15
local Char = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Char:WaitForChild("Humanoid")
if Humanoid.RigType ~= Enum.HumanoidRigType.R15 then
-- Respawn the player as R15
Player:LoadCharacter()
end
end
local function PlayerAdded(Player)
Player.CharacterAdded:Connect(function(Char)
local Humanoid = Char:WaitForChild("Humanoid")
-- Ensure R15 is applied
SetCharacterToR15(Player)
-- Customize the character
CustomizeCharacterAppearance(Humanoid, Player.Name)
end)
end
--// EVENTS/CALLS
Players.PlayerAdded:Connect(PlayerAdded)