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 » Roblox » Help (Technical Support and Account Issues)
Home Search
 

fireball scripting error (help)

Previous Thread :: Next Thread 
GamminMonkey is not online. GamminMonkey
Joined: 01 Nov 2016
Total Posts: 15
08 Jul 2017 08:52 PM
so im trying to make a fireball projectile script and it is coming up with an error on line 35, it says expected "=" near part and i have no idea what i have done,


1 local Tool = script.Parent
2 play = Tool.Parent.Parent
3 mouse = play:GetMouse()
4 char = play.Character
5 hum = char.Humanoid
6 root = char.HumanoidRootPart
7
8 local en = true
9
10 Tool.RemoteEvent.OnServerEvent:connect(function(play,mousehit)
11 local a = hum:LoadAnimation(Tool.Throw)
12 a:Play()
13 root.CFrame = CFrame.new(root.Position,root.Position +
Vector3.new(mousehit.lookVector.x,0,mousehit.lookVector.z))
14 wait(0.5)
15 local Fireball = Tool.Handle:clone()
16 Fireball.CFrame = Tool.Handle.CFrame
17 local bv = Instance.new("BodyVelocity")
18 bv.maxForce = Ve########################19 bv.Velocity = mousehit.lookVector * 50
20 bv.Parent = Fireball
21 Fireball.CanCollide = false
22 Fireball.Parent = game.Workspace
23 ga###############################2###i######################################25 if not ten then return end
26 ten = false
27 local ehum = hit.Parent:FindFirstChild("Humanoid")
28 if ehum and ehum ~= hum then
29 ehum:TakeDamage(10)
30 elseif hit.Anchored == true and hit.CanCollide == true then
31 for i=1,10 do
32 local part = Fireball:clone()
33 part.Size = Vector3.new(0.5,0.5,0.5)
34 part.CFrame = Fireball CFrame
35 part.BodyVelocity.Velocity =
Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30),
36 part.Parent = game.Workspace
37 game.Debris:AddItem(part,1)
38 end
39
40 end
41
42 wait()
43 ten = true
44 end)
45
46 end)
Report Abuse
Axiliyah is not online. Axiliyah
Joined: 28 Nov 2013
Total Posts: 2633
09 Jul 2017 09:39 AM
wrong subforum, but I'll help you out anyway

you're missing a ")" to close your parentheses

you wrote:
part.BodyVelocity.Velocity =
Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30),

this line should fix it:
part.BodyVelocity.Velocity =
Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)),



Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » Help (Technical Support and Account Issues)
   
 
   
  • 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