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
 

Whats wrong with this?

Previous Thread :: Next Thread 
MattDominator is not online. MattDominator
Joined: 20 Oct 2008
Total Posts: 3981
16 Jun 2013 09:00 PM
I've been trying to make a humanoid walk towards a players torso:

repeat
wait(1)
PlayerName = script.Parent.Threats.ValueObject.Value.PlayerName
PlayerM = game.Players:FindFirstChild(PlayerName.Value)
script.Parent.Humanoid:MoveTo(Vector3.new(0,0,0),PlayerM.Character.Torso)
until
script.Parent.Humanoid.Health < 1

The script is able to find the player, so i'm guessing that the part that is wrong is this:

script.Parent.Humanoid:MoveTo(Vector3.new(0,0,0),PlayerM.Character.Torso)

The humanoid doesnt only walk towards me, it walks in a bunch of random directions. If I walk towards it, it will walk away from me, then maybe towards me, then in some other direction. If I walk left, it will walk left. It doesnt really make much sense to me. Can anyone tell me what i've done wrong?
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