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: Argument 2 is Invalid?

Previous Thread :: Next Thread 
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
28 Jan 2014 06:13 PM
script.Parent.MouseButton1Click:connect(function()
local p = game.Players.LocalPlayer
local m = p:GetMouse()
if m.Hit ~= nil then
p.Character.Humanoid:MoveTo(m.Hit.Position)
end
end)

When the player clicks a TextButton, it's supposed to move them to the mouse's Hit position.


✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
28 Jan 2014 09:21 PM
bump
Report Abuse
NotsoPenguin is not online. NotsoPenguin
Joined: 26 Jan 2014
Total Posts: 37
28 Jan 2014 09:23 PM
p.Character.Humanoid:MoveTo(m.Hit.Position,Put A Part Here)
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
28 Jan 2014 09:47 PM
script.Parent.MouseButton1Click:connect(function()
local pl = game.Players.LocalPlayer
local m = pl:GetMouse()
if m.Hit ~= nil and m.Target ~= nil then
pl.Character.Humanoid:MoveTo(m.Hit, m.Target)
end
end)

So now I've got this, what am I doing wrong?

Report Abuse
VoidShredder is not online. VoidShredder
Joined: 06 Jan 2014
Total Posts: 1467
28 Jan 2014 10:15 PM
:MoveTo(m.Hit.p, m.Target)
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
28 Jan 2014 10:24 PM
still not working, getting no output.
Report Abuse
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
28 Jan 2014 10:27 PM
I think all you need is p.Character:MoveTo(). Pretty sure that Humanoid is not necessary.
Report Abuse
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
28 Jan 2014 10:28 PM
Ohhhh. I just looked it up, I see what you're doing.
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
28 Jan 2014 11:22 PM
Still need help. qq


✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
29 Jan 2014 12:25 AM
pls


✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
29 Jan 2014 10:27 AM
eh


✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
29 Jan 2014 12:04 PM
halp


✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
29 Jan 2014 01:56 PM
srs no one knows?
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
29 Jan 2014 02:48 PM
Cmon guys it's a small script, surely someone knows what's wrong.


✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
29 Jan 2014 04:39 PM
bump #572


✦мøяƴø子✦
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
29 Jan 2014 05:52 PM
bump #573


✦мøяƴø子✦
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