|
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?
|
|
|
I tried it with h.Parent = hit ;-;
|
|
|
UzilJoin Date: 2014-06-02 Post Count: 366 |
tell me exactly what you are trying to do and I can help you |
|
SunXaoJoin Date: 2016-04-15 Post Count: 3761 |
You need to check if the touched object is linked to humanoid, then parent it into the torso.
|
|
|
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.
|
|
|
When you help me, give me the script line(s) so I can copy and paste lol
|
|
NoiretopJoin Date: 2012-09-04 Post Count: 7 |
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 |
|
NoiretopJoin Date: 2012-09-04 Post Count: 7 |
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 |
|
NoiretopJoin Date: 2012-09-04 Post Count: 7 |
--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)
|
|
|
It's still not working :(
|
|
|
Wouldn't the scripts be similar to one of a morph? |
|
|
Maybe, I'm on to something right now so I'll try it later. Thanks!
|
|