|
| 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
|
  |
| 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 |
|