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: MoveTo not working

Previous Thread :: Next Thread 
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
16 Apr 2013 07:46 PM
Why doesn't this work

repeat
wait(0.03)
until Game.Players.LocalPlayer.Character ~= nil

repeat
wait(0.03)
until Game.Players.LocalPlayer.Character.Humanoid.Health == 0
print("Death")
script.Grave:MoveTo(Game.Players.LocalPlayer.Character.Torso.Position)
script.Grave.Parent = Workspace


No errors, and works fine other then not being moved.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
16 Apr 2013 07:48 PM
Is 'Grave' a model?
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
16 Apr 2013 07:48 PM
MoveTo operates in workspace

so,

script.Grave.Parent = Workspace
script.Grave:MoveTo(Game.Players.LocalPlayer.Character.Torso.Position)

You need to parent the Grave before you move it.



|MassiveGman| Scripter & part time Professional Whistler
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
16 Apr 2013 07:48 PM
Yes, Should it not be?
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
16 Apr 2013 07:50 PM
:MoveTo() is for models, so yes, it should be. Also, like the other helper said, you should place the model in workspace before moving it. :MoveTo() takes a second argument too. Look it up on the wiki.
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
16 Apr 2013 07:51 PM
http://wiki.roblox.com/index.php/MoveTo_(Method)/humanoid


|MassiveGman| Scripter & part time Professional Whistler
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
16 Apr 2013 07:52 PM
oops

This one is for models

http://wiki.roblox.com/index.php/MoveTo_(Method)/model


|MassiveGman| Scripter & part time Professional Whistler
Report Abuse
chaoticregandpledge is not online. chaoticregandpledge
Joined: 04 Dec 2009
Total Posts: 2894
16 Apr 2013 07:52 PM
The :MoveTo( vec3 ) method doesn't need a second argument if you're calling it on a Model.

http://www.roblox.com/Innocent-place?id=56780928 ~ Innocence
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
16 Apr 2013 07:52 PM
I got it to kinda work


repeat
wait(0.03)
until Game.Players.LocalPlayer.Character ~= nil

repeat
wait(0.03)
until Game.Players.LocalPlayer.Character.Humanoid.Health == 0
print("Death")
GraveStone = script.Grave
GraveStone.Parent = Workspace
GraveStone:MoveTo(Game.Players.LocalPlayer.Character.Torso.Position)



Now it is on top of them though :c
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
16 Apr 2013 09:57 PM
try using cframe
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
16 Apr 2013 10:57 PM
@Master
On a model?
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
17 Apr 2013 04:39 PM
*facepalm*
lol forgot it's a model xd
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