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

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

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)

2 comments

0

Put it in a code block.

0

and its prolly R15

1 answer

✓ Accepted answer

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

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