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

What is wrong with my Script?

Asked by
IcyEvil 260 Moderation Voter
9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

This script is supposed to change the Characters Mesh to Different Mesh Ids, But It only works via the Torso... Tell me why?

while true do
    for _, plr in pairs(game.Players:GetPlayers())do
        plr.Character.Head.Mesh.MeshId = "http://www.roblox.com/asset/?id=19999257"
        plr.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=20001023"
        plr.Character.Head.Transparency = "0"
        plr.Character.Head.face.Texture = "0"
      c = Instance.new("CharacterMesh") 
      c.Parent = plr.Character
      c.Name = "hj"
      c.MeshId = "27111894"
      c.BodyPart = "Torso"
      c:Clone().Parent = plr.Character
      wait()
      c.Name = "yo" 
      x.BodyPart = "Left Arm"
      c.MeshId = "64022346"
         wait()
     c:Clone().Parent = plr.Character
      c.Name = "Lfg"
      c.BodyPart = "Left Leg"
      c.MeshId = "64022355"
        wait()
    c:Clone().Parent = plr.Character 
     c.Name = "Rig"
     c.BodyPart = "Right Arm"
     c.MeshId = "27111894"
      wait()
  c:Clone().Parent = plr.Character
    c.Name = "fg"
    c.BodyPart = "Right Leg"
    c.MeshId = "64022355"
    end
    wait() 
end                  

2 answers

Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
9 years ago

It seems you might have had a typo on line 15, x to me seems like a nil value which would error out the script. You've been using c the whole time with all of your meshes, so use c on line 15.

while true do
    for _, plr in pairs(game.Players:GetPlayers())do
        plr.Character.Head.Mesh.MeshId = "http://www.roblox.com/asset/?id=19999257"
        plr.Character.Head.Mesh.TextureId = "http://www.roblox.com/asset/?id=20001023"
        plr.Character.Head.Transparency = "0"
        plr.Character.Head.face.Texture = "0"
      c = Instance.new("CharacterMesh") 
      c.Parent = plr.Character
      c.Name = "hj"
      c.MeshId = "27111894"
      c.BodyPart = "Torso"
      c:Clone().Parent = plr.Character
      wait()
      c.Name = "yo" 
      c.BodyPart = "Left Arm"
      c.MeshId = "64022346"
         wait()
     c:Clone().Parent = plr.Character
      c.Name = "Lfg"
      c.BodyPart = "Left Leg"
      c.MeshId = "64022355"
        wait()
    c:Clone().Parent = plr.Character 
     c.Name = "Rig"
     c.BodyPart = "Right Arm"
     c.MeshId = "27111894"
      wait()
  c:Clone().Parent = plr.Character
    c.Name = "fg"
    c.BodyPart = "Right Leg"
    c.MeshId = "64022355"
    end
    wait() 
end                  
0
But I have to define it otherwise there would be an error because it doesnt know what its parent is. IcyEvil 260 — 9y
Ad
Log in to vote
-2
Answered by 9 years ago

Hmmm Interesting, Pm An Admin perhaps?

Answer this question