Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why wont my clothes and hats load for my script?

Im making a script for Voidacity Script Battle, and it wont work. Basically the clothes and hats I want to load refuse to load. SCRIPT:

print("This is by Mr_Unlucky, please do not leak.")
print("This script will not work if you dont have any clothes and hats on.")
--Character scripts
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
wait(3)
local RightArm = Character["Right Arm"]
local LeftArm = Character["Left Arm"]
local RightLeg = Character["Right Leg"]
local LeftLeg = Character["Left Leg"]
local Head = Character["Head"]
local Torso = Character["Torso"]
local RootPart = Character["HumanoidRootPart"]
local Humanoid = Character["Humanoid"]
Humanoid.MaxHealth = math.huge -- Makes the health essentially infinite.
wait(0.1)
Humanoid.Health = Humanoid.MaxHealth
Humanoid.WalkSpeed = 100
Humanoid.JumpPower = 80
--VV The rest of this is just editing the character's appearance and stuff.
local BillBoardGUI = Instance.new("BillboardGui",Head)
local Label = Instance.new("TextLabel",BillBoardGUI)
Label.BackgroundTransparency = 1
Label.Position = UDim2.new(0,0,0,-49)
Label.TextColor3 = Color3.fromRGB(0,0,255)
Label.TextStrokeTransparency = 0
Label.Text = "Donald Trump"
Label.Font = "Bodoni"
Label.TextScaled = true
BillBoardGUI.AlwaysOnTop = true
BillBoardGUI.Size = UDim2.new(0,200,0,50)
Label.Size = UDim2.new(0,200,0,50)
Character.Shirt:Destroy()
Character.Pants:Destroy()
Shirt = Instance.new("Shirt",Character)
Pants = Instance.new("Pants",Character)
Shirt.Name = "Shirt"
Pants.Name = "Pants"
Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=136505906"
Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=136506010"
for i,v in pairs(Character:GetChildren()) do
	if v.ClassName == "Accessory" then
		v:Destroy()
	end
end
local hair = Instance.new("Accessory",Character)
local actual_hair = Instance.new("Part",hair)
local hair_mesh = Instance.new("SpecialMesh",actual_hair)
actual_hair.Size = Vector3.new(1.03, 1, 1.67)
hair_mesh.Scale = Vector3.new(0.55, 0.55, 0.55)
hair_mesh.MeshId = "http://www.roblox.com/asset/?id=319337852"
hair_mesh.TextureId = "http://www.roblox.com/asset/?id=376189070"
Head.face.Texture = "rbxassetid://627572862"
function onTouch(part)
	local humanoid = part.Parent:FindFirstChild("Humanoid")
	if (humanoid ~= nil) then 
	humanoid.Health = 0 
end
end
Torso.Touched:connect(onTouch)

1 comment

0

load in your character and paste the shirt and pants id into your current ones. It should automatically get the real id, save that and add it in your script

2 answers

✓ Accepted answer

It is because you did not put the texture id, you put the id of the shirt and pants. To get the texture id you can either do a -1 or a few more until you get it, or use the InsertService and insert the shirt and take the id.

Your shirt texture id is

"http://www.roblox.com/asset/?id=136505905"

Your pants texture id is

"http://www.roblox.com/asset/?id=136506009"

2 comments

0

what about the hat

0

As for the hat and its respective texture, both look correct, the same reasoning of -1 or other options usually applies to all decals.

How do you close this? I fixed it because I made the hat a weld.

This discussion is preserved as it was. New answers, comments, and votes are closed.