Someone please help me I dont know why this script doesnt work
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) local Player = game.Players.LocalPlayer local Character = Player.Character local Shirt = Character:FindFirstChild("Shirt") or Instance.new("Shirt", Character) -- if its in character then get shirt else make a new one local Pants = Character:FindFirstChild("Pants") or Instance.new("Pants", Character) local shirtId = "https://www.roblox.com/catalog/1303497675/Prison-Prison-Prison-Prison-Prison-Prison-Prison" -- put the shirt id here local pantsId = "https://www.roblox.com/catalog/1280655173/Prison-Prison-Prison-Prison-Prison-Prison-Prison" -- put the pants id here Shirt.ShirtTemplate = "rbxassetid://"..shirtId -- set the shirt Pants.PantsTempalte = "rbxassetid://"..pantsId -- set the pants end)
Please help Ive also tried only putting the ID onstead of the full link but it still doesnt work!
I see your problem. Your basically adding the whole roblox link onto the shirts template, instead of just the number. You should have also used a character added script. You can't use local player on a server script. Put this script in server script service. Here is your fixed script:
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) local Player = player local Character = char local Shirt = Character:FindFirstChild("Shirt") or Instance.new("Shirt", Character) -- if its in character then get shirt else make a new one local Pants = Character:FindFirstChild("Pants") or Instance.new("Pants", Character) Shirt.ShirtTemplate = "rbxassetid://1303497675" Pants.PantsTemplate = "rbxassetid://1280655173" end) end)
In fact i used a local script and i also tried not adding the whole thing i guess the problem was the fact that the script wasnt character added but thanks! Edit: there is a problem, there is no such thing as a server script storage