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 » Scripters
Home Search
 

Re: Help needed

Previous Thread :: Next Thread 
Caedus01013 is not online. Caedus01013
Joined: 22 Sep 2011
Total Posts: 279
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
ReynnSolaris is not online. ReynnSolaris
Joined: 16 Jun 2013
Total Posts: 1345
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
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
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
08 Aug 2016 08:01 PM
set the MaxForce to math.huge


Formerly xXTheRobotXx, add 13,349 posts
Report Abuse
Caedus01013 is not online. Caedus01013
Joined: 22 Sep 2011
Total Posts: 279
08 Aug 2016 08:01 PM
Thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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