generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: enderman script

Previous Thread :: Next Thread 
ninja5566 is not online. 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 is not online. 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 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
25 Jan 2013 10:56 PM
Thought so, but he still flings you.
Report Abuse
TacoBowls is not online. 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 is not online. 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 is not online. Spectrial
Joined: 15 Mar 2012
Total Posts: 3348
25 Jan 2013 11:36 PM
how does he "fling" you
Report Abuse
ninja5566 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image