So. I Was once again working on a new game. I wanted to create a system for future games, Where the player’s character will be automatically changed to the “Roblox Boy” Bundle. But once again, I wasted hours trying to figure out the script. So, I used AI, yes, I did. And I told it to force the bundle on the players.
But the problem is, it removes everything from the player’s character. the script basically overrights the player’s stuff. I just wanted them to have hands, or whatever. I just wanted a different bundle, not the player to be completely undressed.
Yes, that what it looks like.
I’ve tried generating Scripts to counteract this problem, but That didn’t work either.
I have to get this post out, so if you can give me some suggestions or help me out. I would Understand.
Apply Bundle Script
local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")
-- Ensure the "ROBLOX Boy" HumanoidDescription exists in the game
local robloxBoyDescription = game.Workspace:FindFirstChild("ROBLOX Boy (109)")
if not robloxBoyDescription then
warn("ROBLOX Boy HumanoidDescription not found in the Workspace.")
return
end
local function applyRobloxBoyBundle(character)
if character then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid:ApplyDescription(robloxBoyDescription)
end
end
end
-- Bind the function to PlayerAdded and CharacterAdded events
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
applyRobloxBoyBundle(character)
end)
end)
-- Apply the bundle to all existing players
local existingPlayers = Players:GetPlayers()
for i, player in existingPlayers do
local character = player.Character or player.CharacterAdded:Wait()
applyRobloxBoyBundle(character)
end
Copy Accessories script 1
`local Players = game:GetService(“Players”)
local function copyAppearance(player)
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass(“Humanoid”)
if humanoid then
local description = humanoid:GetAppliedDescription()
-- Create a new HumanoidDescription to copy the player's appearance
local newDescription = Instance.new("HumanoidDescription")
newDescription.HeadColor = description.HeadColor
newDescription.LeftArmColor = description.LeftArmColor
newDescription.RightArmColor = description.RightArmColor
newDescription.LeftLegColor = description.LeftLegColor
newDescription.RightLegColor = description.RightLegColor
newDescription.TorsoColor = description.TorsoColor
newDescription.Face = description.Face
newDescription.HatAccessory = description.HatAccessory
newDescription.FaceAccessory = description.FaceAccessory
newDescription.NeckAccessory = description.NeckAccessory
newDescription.ShoulderAccessory = description.ShoulderAccessory
newDescription.FrontAccessory = description.FrontAccessory
newDescription.BackAccessory = description.BackAccessory
newDescription.WaistAccessory = description.WaistAccessory
-- Apply the new description to the character
humanoid:ApplyDescription(newDescription)
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
copyAppearance(player)
end)
end)
local existingPlayers = Players:GetPlayers()
for i, player in existingPlayers do
player.CharacterAdded:Connect(function()
copyAppearance(player)
end)
end`
Copy Accessories Script 2
`local Players = game:GetService(“Players”)
– Function to save player’s appearance
local function savePlayerAppearance(player)
local appearanceData = {
accessories = {},
bodyColors = {}
}
local character = player.Character or player.CharacterAdded:Wait()
if character then
-- Save accessories
for i, accessory in character:GetChildren() do
if accessory:IsA("Accessory") then
table.insert(appearanceData.accessories, accessory:Clone())
end
end
-- Save body colors
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
local bodyColors = humanoid:FindFirstChild("BodyColors")
if bodyColors then
for property, value in bodyColors:GetChildren() do
appearanceData.bodyColors[property] = value
end
end
end
end
return appearanceData
end
– Function to apply saved appearance to player
local function applyPlayerAppearance(player, appearanceData)
local character = player.Character or player.CharacterAdded:Wait()
if character then
– Remove current accessories
for i, accessory in character:GetChildren() do
if accessory:IsA(“Accessory”) then
accessory:Destroy()
end
end
-- Apply saved accessories
for i, accessory in appearanceData.accessories do
accessory:Clone().Parent = character
end
-- Apply saved body colors
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
local bodyColors = humanoid:FindFirstChild("BodyColors")
if not bodyColors then
bodyColors = Instance.new("BodyColors")
bodyColors.Parent = humanoid
end
for property, value in appearanceData.bodyColors do
bodyColors[property] = value
end
end
end
end
– Function to handle player character
local function onCharacterAdded(player)
local appearanceData = savePlayerAppearance(player)
-- Wait for the character to be fully loaded
player.CharacterAdded:Wait()
-- Apply saved appearance
applyPlayerAppearance(player, appearanceData)
end
– Bind to PlayerAdded event
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
onCharacterAdded(player)
end)
end)
– Iterate through all existing players
for _, player in Players:GetPlayers() do
player.CharacterAdded:Connect(function()
onCharacterAdded(player)
end)
end`
type or paste code here
type or paste code here