So I recently asked this question but I didn't put my code in with the question and thus, I still haven't gotten an answer. So what I am trying to do is make a move so that when a LocalScript notices that a key has been pressed, it calls a RemoteEvent to a Script inside a Tool. The Script then does the rest of the attack. The problem I am encountering is A) It isn't creating all 15 blasts and B) It can't track where my mouse is for each individual blast. I need it to be able to track for each individual blast because each blast should be able to be aimed in a separate direction. Please help! All the scripts are inside of a Tool, along with the RemoteEvent because they have to be for the purpose of my game. Here is the code:
LocalScript:
Player = script.Parent.Parent.Parent
mouse = Player:GetMouse()
Character = Player.Character
mouse.KeyDown:connect(function(key)
if key == "q" then
wait()
script.Parent.RemoteEvent:FireServer()
end
end)
Script:
Player = script.Parent.Parent.Parent
mouse = Player:GetMouse()
Character = Player.Character
script.Parent.RemoteEvent.OnServerEvent:connect(function(player)
wait()
local originalspeed = Character.Humanoid.WalkSpeed
Character.Humanoid.WalkSpeed = 0
local circle = game.Lighting.GroundCircle:Clone()
circle.Parent = Character.HumanoidRootPart
circle.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0, -2, 0)
for i = 1, 10 do
wait()
circle.Size = circle.Size + Vector3.new(3, 0, 3)
end
for i = 1, 15 do
wait()
local sword = game.Lighting.Sword:Clone()
sword.Parent = Character.HumanoidRootPart
sword.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0, -10, 0)
for i = 1, 3 do
wait()
sword.Position = sword.Position + Vector3.new(0, 5, 0)
end
sword.Anchored = true
sword.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(math.random(-10, 10), math.random(2, 8), -7)
game.Debris:AddItem(sword, 10)
end
wait(0.1)
local Search = Character.HumanoidRootPart:GetChildren()
for i = 1, #Search do
wait()
if Search[i].Name == "Sword" then
local BV = Instance.new("BodyVelocity")
BV.Parent = Search[i]
BV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
BV.Velocity = mouse.lookVector * 120-------------------------Need the mouse from here
Search[i].CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(math.random(-10, 10), math.random(2, 8), -7)
Search[i].Anchored = false
local SPOSs = Character.HumanoidRootPart.CFrame * Vector3.new(math.random(-10, 10), math.random(2, 8), -7)
Search[i].CFrame = CFrame.new(SPOSs,mouse)
end
end---------------------------------------------------------------Up to here
for i = 1, 10 do
wait()
circle.Size = circle.Size - Vector3.new(3, 0, 3)
end
circle:remove()
Character.Humanoid.WalkSpeed = originalspeed
end)
Hope this can help with getting an answer. I've been stuck at a stand still with this code for a while and would really like to get it fixed.

3 comments
Thank you for the help. Yes, what I need is the direction vector. I'm still a little confused about how this code is going to help with getting the mouse vector to my script every time the loop runs. Sorry, I'm a pretty average scripter.
Also, I am running the loop in a script so how would i feed it to the script via remote event while the loop is running?
I edited my post to hopefully help some of your questions. If you need more help, we could team create. Let me know.