FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 04 Jul 2012 06:34 PM |
Hey, so I have this line that is supposed to move these fireworks to the desired position above the character. It does not work. It spawns them inside the characters torso.
Help?
fireworks.CFrame = player.Character.Torso.CFrame + Vector3.new(0,10,0) |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 04 Jul 2012 06:35 PM |
| Torso.Position not Torso.CFrame |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 04 Jul 2012 06:36 PM |
| would it still be fireworks cframe? |
|
|
| Report Abuse |
|
|
TwoBoo
|
  |
| Joined: 08 Feb 2011 |
| Total Posts: 10790 |
|
|
| 04 Jul 2012 06:37 PM |
| Do you want the firework to stay above the character or just fall after it's been moved? |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 04 Jul 2012 06:37 PM |
| I want the firework to be spawned on top of the character. Nothing else. |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2012 06:38 PM |
| CFrame manages to position the things exactly where you said for them to go, Position moves the things above the point if it does not fit. So in this case, it should spawn above the head. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 04 Jul 2012 06:38 PM |
| You just want them to spawn 10 studs higher than the Player's Torso correct? If so, it should be Position |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 04 Jul 2012 06:40 PM |
fireworks.Position = player.Character.Torso.Position + Vector3.new(0,100,0)
does not work :C |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 04 Jul 2012 06:41 PM |
| Assuming that fireworks is already defined and you want it to spawn 100 studs above the torso, it should work. Unless there is something wrong with some other part of the script. |
|
|
| Report Abuse |
|
|
|
| 04 Jul 2012 06:41 PM |
Is fireworks defined? Check. Is fireworks a model? Use MoveTo(player.Character.Torso.Position + Vector3.new(0,100,0)) (I think) |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 04 Jul 2012 06:44 PM |
It is defined.
It just spawns it in the characters torso, not above it.
Here is the function.
function onLevelUp(player, XP, level) if player.Character~=nil then for i = 1,1 do local fireworks = Instance.new("Part") fireworks.Shape = 0 fireworks.formFactor = "Brick" fireworks.Size = Vector3.new(1,1,1) fireworks.BrickColor = player.TeamColor fireworks.Position = player.Character.Torso.Position + Vector3.new(0,100,0) fireworks.Parent = game.Workspace fireworks.CanCollide = false fireworks.Transparency = 0 cm = Instance.new("SpecialMesh") cm.MeshId = "http://www.roblox.com/asset/?id=20329976" cm.Parent = fireworks s = Instance.new("Sound") s.Parent = player.Character.Head s.SoundId = "http://www.roblox.com/asset/?id=1369158" weld = Instance.new("Weld") weld.Parent = fireworks weld.Part1 = player.Character.Torso weld.Part0 = fireworks move = game.Lighting.Movement:Clone() move.Parent = fireworks end end end |
|
|
| Report Abuse |
|
|