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: Vector3.new

Previous Thread :: Next Thread 
FootBa11 is not online. 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 is not online. WhiteRain
Joined: 24 Apr 2010
Total Posts: 2723
04 Jul 2012 06:35 PM
Torso.Position not Torso.CFrame
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
04 Jul 2012 06:36 PM
would it still be fireworks cframe?
Report Abuse
TwoBoo is not online. 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 is not online. 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
HilariousDwarf is not online. HilariousDwarf
Joined: 20 Aug 2010
Total Posts: 2020
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 is not online. 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 is not online. 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 is not online. 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
HilariousDwarf is not online. HilariousDwarf
Joined: 20 Aug 2010
Total Posts: 2020
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 is not online. 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
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