|
| 08 Aug 2016 07:56 PM |
Hello. I am trying to fire a different magic projectile based on the direction the character is facing,but so far I've had no luck.
Here is a snippet of my code:
if char.Torso.CFrame.lookVector==char.Torso.CFrame.x then local magic1=game.ServerStorage.Magic1:clone() magic1.Name="Magic" magic1.Parent=game.Workspace magic1.Position=char["Right Arm"].Position magic1.Velocity=char.Torso.CFrame.lookVector*100 wait(4) magic1:Remove() elseif char.Torso.CFrame.lookVector==char.Torso.CFrame.z then local magic2=game.ServerStorage.Magic2:clone() magic2.Name="Magic" magic2.Parent=game.Workspace magic2.Position=char["Right Arm"].Position magic2.Velocity=char.Torso.CFrame.lookVector*100 wait(4) magic2:Remove() end |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 07:59 PM |
use look direction with the camera
(cam.CoordinateFrame.lookVector - char.Torso.CFrame).magnitude >= lol
u get it
|
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 08:00 PM |
@above
no
the way he has it 100% fine
something else is wrong
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2016 08:01 PM |
set the MaxForce to math.huge
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|
| |
|