I think, you don’t need a script for that.
You need to rename a model (npc) to “StarterCharacter” and put it into StarterPlayer
In the model, delete the configuration/animations/ModuleScripts FOLDERS if there are any.
(the npc shall have the outfit you want the player to wear when they join!)
that does work but I want CERTAIN players to change. Like lets say builderman joins the game he would spawn with some custom clothing but if another player joins that’s not builderman they wouldn’t change.
local Game = game
local Players = Game:GetService("Players")
local Whitelist = {1, 2, 3} --List of whitelisted user IDs.
local function OnPlayerAdded(Player)
local function OnCharacterAdded(Character)
if not table.find(Whitelist, Player.UserId) then return end
if not Player:HasAppearanceLoaded() then Player.CharacterAppearanceLoaded:Wait() end
local Shirt = Character:FindFirstChildOfClass("Shirt") or Instance.new("Shirt")
local Pants = Character:FindFirstChildOfClass("Pants") or Instance.new("Pants")
Shirt.ShirtTemplate = "rbxassetid://0" --Replace 0 with the shirt's template ID.
Pants.PantsTemplate = "rbxassetid://0" --Replace 0 with the pant's template ID.
Shirt.Parent = Character
Pants.Parent = Character
end
Player.CharacterAdded:Connect(OnCharacterAdded)
end
Players.PlayerAdded:Connect(OnPlayerAdded)