Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont my clothes and hats load for my script?

Asked by
Mr_Unlucky 1085 Moderation Voter
6 years ago

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)
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 hellmatic 1523 — 6y

2 answers

Log in to vote
0
Answered by
RoyMer 301 Moderation Voter
6 years ago
Edited 6 years ago

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"
0
what about the hat Mr_Unlucky 1085 — 6y
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. RoyMer 301 — 6y
Ad
Log in to vote
0
Answered by
Mr_Unlucky 1085 Moderation Voter
6 years ago

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

Answer this question