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
 

MoveTo is not a valid member of player

Previous Thread :: Next Thread 
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 09:47 PM
local player = game.Players.LocalPlayer

function RArrow()
print(player)
print("Entering Teleport")
player.Torso:MoveTo(player.Torso.Position + 0,0,4)
wait()
end
script.Parent.MouseButton1Down:connect(RArrow)


I have no idea why I'm getting: MoveTo is not a valid member of player... Anybody have any ideas?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
01 May 2014 09:49 PM
local player = Game.Players.LocalPlayer.Character
Report Abuse
Cizox is not online. Cizox
Joined: 25 Dec 2009
Total Posts: 42220
01 May 2014 09:50 PM
local player = game.Players.LocalPlayer.Character

function RArrow()
print(player)
print("Entering Teleport")
player:MoveTo(player.Torso.Position + 0,0,4)
wait()
end
script.Parent.MouseButton1Down:connect(RArrow)
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 09:51 PM
Now I'm getting Torso is not a valid member of player..
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 10:08 PM
bump
Report Abuse
Cizox is not online. Cizox
Joined: 25 Dec 2009
Total Posts: 42220
01 May 2014 10:15 PM
local player = game.Players.LocalPlayer.Character

script.Parent.MouseButton1Down:connect(function()
print(player.Name.." Entering Teleport")
player:MoveTo(Vector3.new(player.Torso.Position.X, player.Torso.Position.Y, player.Torso.Position.Z + 4))
end)
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 10:23 PM
attempt to index player a nil value, Line 4
Report Abuse
Cizox is not online. Cizox
Joined: 25 Dec 2009
Total Posts: 42220
01 May 2014 10:28 PM
How can that be if I tested it myself?
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 10:29 PM
Local script, Inside a Image Button?
Report Abuse
Cizox is not online. Cizox
Joined: 25 Dec 2009
Total Posts: 42220
01 May 2014 10:34 PM
Yes, I tested this inside a LocalScript within a GUI Frame.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
01 May 2014 10:35 PM
Its because the character doesn't exist when you try and run the script.
Check if it exist before declaring your variable.
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 10:36 PM
Well than, I have no idea! hmmm ita hm hm
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 10:37 PM
@128GB ok, I'll try..
Report Abuse
xXFIREFACEXx is not online. xXFIREFACEXx
Joined: 18 Jul 2012
Total Posts: 1427
01 May 2014 10:40 PM
Thanks a ton 128GB I got it working!
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