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()

Previous Thread :: Next Thread 
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 03:12 PM
a:MoveTo(workspace:FindFirstChild("Part".Position))

Output says "')' expected near '.'". Please note that this is not the full script, if you need it, I'll be happy to provide it.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
30 Aug 2011 03:14 PM
Part:MoveTo(Vector3, Object)
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
30 Aug 2011 03:15 PM
local Part = workspace:FindFirstChild("Part")
a:MoveTo(Part.Position, Part)
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
30 Aug 2011 03:15 PM
a:MoveTo(workspace:FindFirstChild("Part").Position)

@Dark - Those are the arguments for a humanoid.
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
30 Aug 2011 03:15 PM
a:MoveTo(workspace:FindFirstChild("Part".)Position)
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
30 Aug 2011 03:16 PM
@Ziz - Uhh, no.

I win. :3
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
30 Aug 2011 03:16 PM
Oh :o
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
30 Aug 2011 03:19 PM
Oh my word.

a:MoveTo(workspace:FindFirstChild("Part").Position)

Lolfail
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
30 Aug 2011 03:20 PM
@Ziz - I already said it. :P
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
30 Aug 2011 03:21 PM
I saw that. I had:

a:MoveTo(workspace:FindFirstChild("Part".)Position)

But i made it

a:MoveTo(workspace:FindFirstChild("Part").Position)

Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 03:22 PM
So many answers, it's taking me forever to try them all.
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
30 Aug 2011 03:24 PM
trolololo

just use mine


-Like an __AWESOME__ boss![my siggy pic](http://t6ak.roblox.com/64a4c92f65fb2f33a4382576efb1a0d6)
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 03:24 PM
Yeah, I tried it, it works.

-Like a boss
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
30 Aug 2011 03:31 PM
Give a better name to your variables. 'a' isn't descriptive enough.

a:MoveTo(Workspace:FindFirstChild('Part').Position)

Note:

DO NOT USE 'workspace', it is deprecated! Instead, use 'Workspace'.
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 03:34 PM
Another problem. later in the script.

script.Parent.Parent.Parent.Parent.Parent.Character.Torso.Position = a.VehicleSeat.Position

Output: "attempt to index 'a', a nil value" or something like that.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
30 Aug 2011 03:36 PM
At this state, it'd be better to just give us the whole script.

The variable 'a' was not defined in the scope in which you tried to access it, which caused an error.

That might be either because it was not defined at all, either because it wasn't defined in the scope where the error happened.
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 03:44 PM
a = game.Lighting.Model:clone() is the definition of 'a' at the beginning of the script.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
30 Aug 2011 03:54 PM
Find a better name for your variables, 'a' is not descriptive enough.

And also find a better name for your objects, 'Model' is not descriptive enough.

Also, do not use Instance::clone, it is deprecated. Use Instance::Clone instead.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
30 Aug 2011 04:02 PM
> DO NOT USE `workspace`, it is deprecated! Instead, use `Workspace`.

Since when? To me, all local variables should be lowerCamelCase (the exception being classes, such as `CFrame`. `Workspace` violates this rule.
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 04:05 PM
@Julien, my variables are as descriptive as they need to be for my needs, they have nothing to do with my script not functioning.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
30 Aug 2011 04:07 PM
"Since when?"

I do not know since when, that's just what the object browser says.

If DataModel.workspace is deprecated (it is, in the object browser), the variable 'workspace', which is precisely pointing to DataModel.workspace is deprecated too. However, the variable 'Workspace' points to DataModel.Workspace, which is precisely the replacement of DataModel.workspace. Therefore, 'workspace' is deprecated and 'Workspace' is not.

It's all in the object browser.

Note that you have to go in the 'Authoring' section of your settings and enable showing of deprecated objects to see DataModel.workspace in your object browser.

Note that neither DataModel.Workspace, neither DataModel.workspace is shown in the wiki, because the wiki is a complete fail.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
30 Aug 2011 04:11 PM
"@Julien, my variables are as descriptive as they need to be for my needs, they have nothing to do with my script not functioning."

How would you know that? Maybe the fact that your script is not clear enough could have influenced your comprehension of itself, thus resulting in you making an error.
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 04:15 PM
'a' is the only variable in the script, 'Model' is the only thing of that name in the place, as is 'Part'.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
30 Aug 2011 04:24 PM
> If DataModel.workspace is deprecated (it is, in the object browser), the variable 'workspace' is deprecated too

I don't see how you can draw that conclusion. The script environment is not necessarily correlated in any way to the DataModel object.

> the variable 'workspace', which is precisely pointing to DataModel.workspace

Since `workspace == Workspace == game.workspace == game.Workspace`, I don't think you can reasonably claim that they are distinct

------------------------------------------------------------------

Is `game` deprecated too then?
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
30 Aug 2011 04:27 PM
Can we not talk about technicalities and just work on my script?
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