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 |
|
|
|
| 30 Oct 2012 11:32 AM |
Model:TranslateBy(Vector3.new(script.Parent.Parent.SpawnPad.Position))
I think. . .
¤¤ †KMXD† ¤¤
|
|
|
| Report Abuse |
|
|
occo9
|
  |
| Joined: 17 Jul 2009 |
| Total Posts: 53 |
|
|
| 30 Oct 2012 11:34 AM |
| Thanks for the reply, im testing it now.... |
|
|
| Report Abuse |
|
|
|
| 30 Oct 2012 11:37 AM |
Sorry, that's now what you want, one sec.
¤¤ †KMXD† ¤¤ |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 30 Oct 2012 11:41 AM |
You can try this first:
Model:MoveTo(Vector3.new(script.Parent.Parent.SpawnPad.Position))
¤¤ †KMXD† ¤¤ |
|
|
| Report Abuse |
|
|
occo9
|
  |
| Joined: 17 Jul 2009 |
| Total Posts: 53 |
|
| |
|
|
| 30 Oct 2012 12:42 PM |
| Model:MoveTo(game.Workspace.SpawnPad.Position) |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 17 Jul 2009 |
| Total Posts: 53 |
|
|
| 30 Oct 2012 02:18 PM |
You tehchikenhater, are a genius. "Gives praise"
:) Thanks! |
|
|
| Report Abuse |
|
|