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: Please help me figure out this CFrame issue

Previous Thread :: Next Thread 
Nogalo is not online. Nogalo
Joined: 06 May 2016
Total Posts: 14
02 Feb 2017 02:15 PM
Hello everyone.

I'm making a class based game and to start with i'm trying to make the Wizard class.I'm looking to make the spells as fun and functional as those in Elemental Battlegrounds by Gamer Robot but as you can image I didn't get very far. For starters i want to make a very basic Fireball spell and here's what i got so far

01
local fireball = Instance.new("Part")
02
fireball.Shape = "Ball"
03
fireball.Size = Vector3.new(1,1,1)
04
fireball.BrickColor = BrickColor.new("Really red")
05
fireball.Transparency = 0.5
06
fireball.TopSurface = "Smooth"
07
fireball.BottomSurface = "Smooth"
08

09
fireball.CFrame = player.Character.Torso.CFrame *CFrame.new(1.5,0,-3)
10

11
fireball.CFrame = CFrame.new(handle.CFrame.p:Lerp(mouse.Hit.p, 0.5), mouse.Hit.p)
12

13
fireball.Parent = game.Workspace
Currently the fireball spawns where the mouse is pointing but what i'm trying to make happen is that the fireball spawns infront of me and moves in the direction the mouse is pointing i've been trying all sorts of combinations using CFrame and Vector3 but i just can't figure it so please help and thanks
Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
02 Feb 2017 02:16 PM
https://twitter.com/rbxdevtips/status/619719852857495552?lang=en
Report Abuse
Nogalo is not online. Nogalo
Joined: 06 May 2016
Total Posts: 14
02 Feb 2017 02:30 PM
I don't understand how i would go about defining a start and a finish CFrame when my start is suppose to be in front of my character and the goal should be the location where my mouse is pointing
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