ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 25 Jan 2013 10:34 PM |
--teleport
ender = script.Parent ender["Right Arm"].Touched:connect(function(hit) hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil then arm = hum.Parent["Right Arm"] magnitude = (ender.Torso.Position - arm.Position).magnitude if magnitude > 1 then print(magnitude) print("Found") wait(4) sp = Instance.new("Sparkles", ender.Head) ender.Zombie.WalkSpeed = 10 ender.Torso.CFrame = arm.CFrame wait(1) sp:Destroy() end end end) --------------------------------------------------------------------------------------------------------
I have a working enderman npc script (yey) and I need 2 things..
1.The sparkles to be purple (Heh, I forgot how to do so.. maybe color3?)
2.When he teleports to you he flings you.. how do I change that with lookvector? |
|
|
| Report Abuse |
|
|
milktea
|
  |
| Joined: 31 Jan 2009 |
| Total Posts: 71 |
|
|
| 25 Jan 2013 10:55 PM |
sp.SparkleColor = Color3.new( this, this, this)
fill in yourself. |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 25 Jan 2013 10:56 PM |
| Thought so, but he still flings you. |
|
|
| Report Abuse |
|
|
TacoBowls
|
  |
| Joined: 02 Mar 2009 |
| Total Posts: 112 |
|
|
| 25 Jan 2013 11:32 PM |
For the Sparkles, yes, you would use Color3. For example;
function Color(r, g, b) return Color3.new(r/154, g/0, b/255) end
Color3.new(153, 0, 255) is a shade of Purple, a lighter one. If you don't know how to get the color you want, search 'RGB Color Wheel' or something like that, and you can pick the color and receive the R/G/B Values.
|
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 25 Jan 2013 11:33 PM |
no crap einstein (lol jk)
but seriously I already know that but what about the flinging part? |
|
|
| Report Abuse |
|
|
Spectrial
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 3348 |
|
| |
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 25 Jan 2013 11:50 PM |
I get teleported.
I get teleported .. Inside of him.
and he flings me.
Easy physics right? |
|
|
| Report Abuse |
|
|
Spectrial
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 3348 |
|
|
| 25 Jan 2013 11:56 PM |
oh i see
...you're inside him...
ender = script.Parent ender["Right Arm"].Touched:connect(function(hit) hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil then arm = hum.Parent["Right Arm"] magnitude = (ender.Torso.Position - arm.Position).magnitude if magnitude > 1 then print(magnitude) print("Found") wait(4) sp = Instance.new("Sparkles", ender.Head) ender.Zombie.WalkSpeed = 10 ender.Torso.CFrame = arm.CFrame + math.random(5,10) wait(1) sp:Destroy() end end end)
try that?
i dont know, i usually work with vector3 and not cframe |
|
|
| Report Abuse |
|
|