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

Torso is not a valid member of Model how to fix?

Asked by 4 years ago

hey guys the first problem was solved and ive had another problem with scripting it says : Torso is not a valid member of Model here is the script or the code:

function onTouch(hit)

if game.Players:FindFirstChild(hit.Parent.Name) ~= nil then

local player = game.Players:FindFirstChild(hit.Parent.Name)

local c = player.Character:GetChildren()

for i=1, #c do

if (c[i].className == "Hat") or c[i].Name == "Character" then

c[i]:Destroy()

end

end

player.Character.Torso.Transparency = 1

player.Character:FindFirstChild("Left Arm").Transparency = 1

player.Character:FindFirstChild("Left Leg").Transparency = 1

player.Character:FindFirstChild("Right Arm").Transparency = 1

player.Character:FindFirstChild("Right Leg").Transparency = 1

player.Character.Humanoid.WalkSpeed = 16 -- You can change how fast players walk as this character!

local hide = Instance.new("SpecialMesh")

hide.MeshType = "FileMesh"

MeshId = ""

hide.Parent = player.Character.Head

local p = script.Parent.Parent:FindFirstChild("Character"):clone()

p.Parent = player.Character

p.CFrame = CFrame.new(player.Character.Torso.Position)

p.Anchored = false

local Y = Instance.new("Weld")

Y.Part0 = player.Character.Torso

Y.Part1 = p

Y.Parent = Y.Part0

itemlist = script.Parent:FindFirstChild("StartTools"):GetChildren()

if #itemlist ~= 0 then

for i= 1, #itemlist do

local itemc = itemlist[i]:clone()

itemc.Parent = player.Backpack

end

end

end

end

script.Parent.Touched:connect(onTouch)

0
Put it in a code block. The_Pr0fessor 595 — 4y
0
and its prolly R15 The_Pr0fessor 595 — 4y

1 answer

Log in to vote
0
Answered by
VicyX 27
4 years ago

If the game is R15 then use "UpperTorso" and not "Torso"

Ad

Answer this question