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: Regenerating A Model

Previous Thread :: Next Thread 
occo9 is not online. occo9
Joined: 17 Jul 2009
Total Posts: 53
30 Oct 2012 11:20 AM
I have made a model that regenerates when you press a button but it always regenerates to its original location but I want it to always regenerate at the location a moving brick is at (SpawnPad). So even if spawnpad moves, when the button is pressed the model will still respawn on it.

Currently I've got all the regen stuff working but I just need to set the position of the whole model to the position of SpawnPad.

Model.Body.Part1.CFrame = CFrame.new(Vector3.new(script.Parent.Parent.SpawnPad.CFrame))

This is what I thought might work (as it is similar to the way you move a player) but it didnt work.

Any help appreciated.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
30 Oct 2012 11:32 AM
    Model:TranslateBy(Vector3.new(script.Parent.Parent.SpawnPad.Position))

I think. . .

¤¤ †KMXD† ¤¤
Report Abuse
occo9 is not online. occo9
Joined: 17 Jul 2009
Total Posts: 53
30 Oct 2012 11:34 AM
Thanks for the reply, im testing it now....
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
30 Oct 2012 11:37 AM
Sorry, that's now what you want, one sec.

¤¤ †KMXD† ¤¤
Report Abuse
occo9 is not online. occo9
Joined: 17 Jul 2009
Total Posts: 53
30 Oct 2012 11:37 AM
Doesnt work, still going to the original position...
Thanks for trying though,
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
30 Oct 2012 11:39 AM
I see you used CFrame, would moving the model there without CFrame collide with anything?

¤¤ †KMXD† ¤¤
Report Abuse
occo9 is not online. occo9
Joined: 17 Jul 2009
Total Posts: 53
30 Oct 2012 11:41 AM
Err, I think so, I dont really understand CFrame movement, I just saw it on the wiki, If you want I'l show you what I am trying to do at my place?
Or you can just tell me if you think you have a solution,
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
30 Oct 2012 11:41 AM
You can try this first:

Model:MoveTo(Vector3.new(script.Parent.Parent.SpawnPad.Position))


¤¤ †KMXD† ¤¤
Report Abuse
occo9 is not online. occo9
Joined: 17 Jul 2009
Total Posts: 53
30 Oct 2012 12:12 PM
Bumpa!
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
30 Oct 2012 12:42 PM
Model:MoveTo(game.Workspace.SpawnPad.Position)
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
30 Oct 2012 01:24 PM
Simply you use :Clone()

koen500

Lt. General Magnus Gui Varius from the Zeralian Empire

Second Commander from K.V.K.

Scripter at high level
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
30 Oct 2012 01:24 PM
It's very easy throught.



koen500

Lt. General Magnus Gui Varius from the Zeralian Empire

Second Commander from K.V.K.

Scripter at high level
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
30 Oct 2012 01:26 PM
@koen500,

:clone() works, but that's not his problem. His problem is that when he does:

Model:clone().Parent=game.Workspace

it spawns somewhere where the SpawnPad is not. Because the SpawnPad moves. So he wants the Model to be moved to the SpawnPad. I doubt you're a High Level Scripter. -.-'
Report Abuse
occo9 is not online. occo9
Joined: 17 Jul 2009
Total Posts: 53
30 Oct 2012 02:18 PM
You tehchikenhater, are a genius.
"Gives praise"

:) Thanks!
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