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: Simple Question...

Previous Thread :: Next Thread 
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 10:49 PM
Is there a position on models? Like this:

game.Workspace.Model.Position


Is there?
Thanks!

_-~Jade~-_
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 10:53 PM
Anything?
I mean it's pretty simple.. e.e'

I'll just test it myself. >:(
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 10:54 PM
Guess there's not.. -.-'
Report Abuse
LordSiphon is not online. LordSiphon
Joined: 28 May 2012
Total Posts: 518
30 Jun 2012 10:55 PM
Well, if you are trying to move them, you use :MoveTo()

~Clans fall, people don't~
Report Abuse
Neflicx is not online. Neflicx
Joined: 24 Jun 2012
Total Posts: 42
30 Jun 2012 10:57 PM
There is not 'Position' or CFrame proprty in models. To view properties, click view -> Properties (also view explorer)
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 10:57 PM
Output:
(I used comandbar to test this.)

> game.Workspace.Model:MoveTo(5,5,5)
22:56:06 - Unable to cast double to Vector3
22:56:06 - Script "game.Workspace.Model:MoveTo(5,5,5)", Line 1
22:56:06 - stack end
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 10:59 PM
Ohhh Nvm I found it in the wiki. FOUND my mistake. -.-'
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 11:02 PM
How would I use the :MoveTo
to move a Cloned Model to it's OLD model's position?
Like a Tycoon regen..
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 11:03 PM
Simplified^^

How would I use a variable in :MoveTo ?
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 11:09 PM
I'm so confused. :(
Report Abuse
LordSiphon is not online. LordSiphon
Joined: 28 May 2012
Total Posts: 518
30 Jun 2012 11:12 PM
Well, you would have the position stored as a Variable, or just remember the numbers. I'm not 100% sure on this, it's an iffy subject for me.. I'm not going over the clone part, but I'll try the :MoveTo.

    Workspace.MODELNAMEHERE:MoveTo(Vector3.new(5,5,5))

~Clans fall, people don't~
Report Abuse
LordSiphon is not online. LordSiphon
Joined: 28 May 2012
Total Posts: 518
30 Jun 2012 11:14 PM
Oh, sorry. I know what you're talking about now. I'm not sure, but maybe test this.

    position = (5,5,5)
    Workspace.Model:MoveTo(Vector3.new(position))

~Clans fall, people don't~
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
30 Jun 2012 11:18 PM
You need to define a variable that contains the model's old position.

local position = model:GetModelCFrame()
wait(30)
model:MoveTo(position.p)

Annoying the crap out of you, one word at a time. -Says suoicodilaipxecitsaligirfilacrepus repeatedly-
Report Abuse
jadescool45768 is not online. jadescool45768
Joined: 31 Aug 2011
Total Posts: 28
30 Jun 2012 11:39 PM
So will this work? o3o


function regen(plyr)
if plyr.Name == script.Parent.Parent.Owner.Value then
wait()
local l = game.Lighting
if l.TycoonBackup ~= nil then
local c = l.TycoonBackup:Clone()
local position = script.Parent.Parent.Parent:GetModelCFrame()
c.Parent = Workspace
c:MoveTo(position)
local t = script.Parent.Parent.Parent
t:Destroy()
end
end
end
game.Players.ChildRemoved:connect(regen)
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
01 Jul 2012 06:59 AM
It should, don't see why it wont.

Annoying the crap out of you, one word at a time. -Says suoicodilaipxecitsaligirfilacrepus repeatedly-
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
01 Jul 2012 08:00 AM
:GetModelCFrame()
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