|
| 05 Jul 2017 10:21 PM |
So in my game, I'm making a kamehameha blast from scratch. I have my own animations and such. But the positioning of my waves aren't the way I want it to be. I want the cylinder (the wave) to have the top pointing out. So I told it to turn 90 degrees and other degrees, but its moving in other directions. If I could get some help, I'd greatly appreciate it.
Here's my script for the blast part:
-- Notes: c = the charging part, which is the ball that it shoots out of.
wait(2.2) local b = Instance.new("Part") b.Size = Vector3.new(2,2,3) b.Parent = c b.CanCollide = false b.Material = "Neon" local mesh = Instance.new("CylinderMesh") mesh.Parent = b mesh.Scale = Vector3.new(1,1,1) b.Anchored = true b.BrickColor = BrickColor.new("Electric blue") b.CFrame = char.Head.CFrame * CFrame.new(0,0,0) * CFrame.Angles(-180,0,0) g.Parent = b |
|
|
| Report Abuse |
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3437 |
|
|
| 05 Jul 2017 10:42 PM |
CFrame.Angles automatically defaults to radians, not degrees
To do that you'd want to use math.rad() to convert your degrees to radians or just put in radians to start with:
CFrame.Angles(math.rad(-180),0,0)
Or
CFrame.Angles(-math.pi,0,0)
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
| 05 Jul 2017 11:02 PM |
| Thanks man, the math.rad() thing works. I haven't tried the math.pi one but, Thanks a lot for your help! |
|
|
| Report Abuse |
|