wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 25 Jan 2012 05:59 PM |
NOTE: This is a long script, i'll only post part of it to save you the trouble:
function onTouch(hit) if hit.Parent.Torso.MeshId == ("37152069") then -- Put the link in the quotes a = game.Lighting:FindFirstChild("Cursed Mummy friend"):clone() a.Parent = hit.Parent.Backpack -- There was "and" here?!? b = game.Lighting:FindFirstChild("Khopesh"):clone() b.Parent = hit.Parent.Backpack
Output: Line 2: MeshId is not a valid member of Part
... |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2012 06:00 PM |
There is no "MeshID" in a player's torso.
† KMXD † |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 25 Jan 2012 06:05 PM |
| Lol, it's right below torso, so that's what i suspected '^_^ |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 25 Jan 2012 07:13 PM |
Ok, new problem, I tried to make it work, but it keeps saying "Mummy Torso" is not valid. That is true. But I want it to check if i have another torso.
function onTouch(hit) if hit.Parent["Mummy Torso"].MeshId["37152069"] ~= nil then -- Put the link in the quotes a = game.Lighting:FindFirstChild("Cursed Mummy friend"):clone()--Mummy a.Parent = hit.Parent.Backpack -- There was "and" here?!? b = game.Lighting:FindFirstChild("Khopesh"):clone() b.Parent = hit.Parent.Backpack |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2012 07:19 PM |
"But I want it to check if i have another torso." Mind explaining? |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 25 Jan 2012 07:23 PM |
| It gives you weapons based off of your torso mesh(If any) It stops after verifying that the mummy isnt my body. It's supposed to check for my other bodies. |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2012 07:25 PM |
Try?
function onTouch(hit) if hit.Parent:FindFirstChild("Mummy Torso").MeshId["37152069"] then a = game.Lighting:FindFirstChild("Cursed Mummy friend"):clone()--Mummy a.Parent = hit.Parent.Backpack -- There was "and" here?!? b = game.Lighting:FindFirstChild("Khopesh"):clone() b.Parent = hit.Parent.Backpack |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
| |
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 25 Jan 2012 07:35 PM |
@Wow75
See that torso your using right now? Go in Build mode with it, Open up Explorer. Open up your character instance. At the bottom there should be 6 Instances classed as 'CharacterMesh' Their thumbnail is a Little clip.
Each class of characterMesh that is in the ROBLOX Catalog has a diffrent name. You want to check if the one you want exists. |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 25 Jan 2012 07:44 PM |
| Well, its a game for everyone, anyone(with a body) can come on and expect to get powers based off of their body. So far, only a mummy body will work... |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2012 07:46 PM |
@Wow Oh, well they don't use meshes for the body.
† KMXD † |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 25 Jan 2012 07:59 PM |
I know, they're those little film looking things. And i think i found a solution, put each different body in a different script, would that work?
Oh! Random question! Whats the event listener for when some one spawns? |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 26 Jan 2012 06:17 PM |
Ok, i tried this, there was no output, and it didnt seem to work:
function onTouch(hit) if hit.Parent["Slinger Torso"] then d = game.Lighting:FindFirstChild("Gunslinger Rifle"):clone() d.Parent = hit.Parent.Backpack else if hit.Parent["Slinger Torso"] == nil then end -- Don't forget the end alert!! end end print("It worked!") script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2012 06:22 PM |
| I suggest you study on your body (lol?) on studio mode and see how the bodymeshes work. Meshes are all places in the character, not any other parts. |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 26 Jan 2012 06:36 PM |
| The slinger torso bodymesh is called "Slinger Torso" hit.Parent would be the person that touched it. I see no problem with this script. |
|
|
| Report Abuse |
|
|
CrasyTrex
|
  |
| Joined: 13 Mar 2011 |
| Total Posts: 761 |
|
|
| 26 Jan 2012 06:48 PM |
| d.Parent = hit.Parent.Backpack -- isn't BackPack in the player not the character? |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 26 Jan 2012 06:58 PM |
| Somebody helped me with the script, and i asked if it was wrong and he/she said no, but thats a good point. So how would i insert it into the backpack? |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
|
| 27 Jan 2012 08:37 PM |
By the time Ur done reading My post, it will be on top of the Page. |
|
|
| Report Abuse |
|
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
| |
|
wow75
|
  |
| Joined: 16 Jan 2009 |
| Total Posts: 951 |
|
| |
|