|
| 14 Aug 2014 09:39 PM |
| I am rather new to using CFrame and I am wondering how I would do this - I am making a GTA V money brick. Basic idea of the 'money brick': When the humanoid dies, the script clones a small, medium, or large cash part from lighting then changes the parent to Workspace. I can't figure out how to get it to spawn/CFrame to where the humanoid died. I can get it to spawn where it was before I cut and pasted it into lighting but not where the humanoid died. I am using "CFrame = CFrame.new(0,0,0)" to CFrame the part to where the humanoid died. Is there a way I can find the position of the humanoid to automatically CFrame it to where it is? Thanks! |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 14 Aug 2014 09:40 PM |
| Any part of the character's position |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 09:40 PM |
This is the basic idea:
humanoid.Died:connect(function() stack_of_cash.CFrame = CFrame.new(humanoid.Parent.Torso.Position) end |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 09:47 PM |
| Alright, thanks! I tried this already but I entered the code wrong. Anyways, thanks for your help! |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 09:50 PM |
moneybrick.CFrame = player.Torso.CFrame |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 09:51 PM |
| moneybrick.CFrame = player.Character.Torso.CFrame* |
|
|
| Report Abuse |
|
|