|
| 23 Apr 2016 11:05 AM |
I've got a script that I made and I can't make it so the new ParticleEmmiter will go inside the humanoid while it hits the part.
function onTouched(hit) local h = Instance.new("ParticleEmitter") h.Color.Start = ("255, 0, 0") h.Color.End = ("255, 140, 0") h.Texture = "rbxgameasset://Images/Speck_Particle" h.Rate = 10 h.Speed = ("5, 6") h.Parent = hit end script.Parent.Touched:connect(onTouched)
Any help on how to make it go into the player's model while it hits?
|
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 11:07 AM |
I tried it with h.Parent = hit ;-;
|
|
|
| Report Abuse |
|
|
| |
|
Uzil
|
  |
| Joined: 02 Jun 2014 |
| Total Posts: 366 |
|
|
| 23 Apr 2016 11:32 AM |
| tell me exactly what you are trying to do and I can help you |
|
|
| Report Abuse |
|
|
War_Force
|
  |
| Joined: 15 Apr 2016 |
| Total Posts: 2611 |
|
|
| 23 Apr 2016 11:34 AM |
You need to check if the touched object is linked to humanoid, then parent it into the torso.
|
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 06:39 PM |
When a Player touches the part it's suppose to go inside the Players torso. I want that result to happen, and I can't script that part.
|
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 06:41 PM |
When you help me, give me the script line(s) so I can copy and paste lol
|
|
|
| Report Abuse |
|
|
Noiretop
|
  |
| Joined: 04 Sep 2012 |
| Total Posts: 7 |
|
|
| 23 Apr 2016 06:52 PM |
so just replace h.Parent = hit by
if hit.Parent.Torso ~= nil then -- means if there is a torso h.Parent = hit.Parent.Torso else -- if not then it ends end end |
|
|
| Report Abuse |
|
|
Noiretop
|
  |
| Joined: 04 Sep 2012 |
| Total Posts: 7 |
|
|
| 23 Apr 2016 06:54 PM |
| Because if you make the parent "hit", it will be in the model and not in the torso so i made if there is a torso then it will be in |
|
|
| Report Abuse |
|
|
Noiretop
|
  |
| Joined: 04 Sep 2012 |
| Total Posts: 7 |
|
|
| 23 Apr 2016 07:02 PM |
--here is the full script :)' --You can just copy and past all even the text at top!
function onTouched(hit) if hit.Parent.Torso ~= nil and hit.Parent.Humanoid ~= nil then local h = Instance.new("ParticleEmitter") h.Color.Start = ("255, 0, 0") h.Color.End = ("255, 140, 0") h.Texture = "rbxgameasset://Images/Speck_Particle" h.Rate = 10 h.Speed = ("5, 6")
h.Parent = hit.Parent.Torso end end script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Apr 2016 08:13 PM |
| Wouldn't the scripts be similar to one of a morph? |
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 08:21 PM |
Maybe, I'm on to something right now so I'll try it later. Thanks!
|
|
|
| Report Abuse |
|
|