I need to have a script add a shirt if there is no shirt on the player because the script breaks when the player dosen't have a shirt.
Code It dosen't seem to add the shirt. Character is R15
local shirtid = 1453678633 game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(chr) local shirt = chr:FindFirstChild("Shirt") local nshirt = Instance.new("Shirt", chr) nshirt.Name = "Shirt" nshirt.ShirtTemplate = "rbxassetid://" ..shirtid end
local ShirtID = 1453678633 game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAppearanceLoaded:Connect(function(chr) local Shirt = chr:FindFirstChildOfClass("Shirt") if not Shirt then local Shirt = Instance.new("Shirt") Shirt.Parent = chr Shirt.ShirtTemplate = "rbxassetid://" .. ShirtID end end) end)
Wiki:
Don't forget to mark my answer as the solution if it solved your problem :)