Hi. A local script inside a tool fires a RemoteEvent also placed inside the tool when activated with the arguments of:
firere:FireServer(mouse, hum, handle, damage, flyoffvals)
The script that runs when RemoteEvent is fired looks like this:
local firere = script.Parent:WaitForChild("Fire")
firere.OnServerEvent:connect(function(player, mouse, hum, handle, damage, flyoffvals)
local fb = handle:Clone()
fb.Parent = game.Workspace
fb.Name = "Fireball"
fb.CFrame = handle.CFrame
print(player.Name .. "'s fireball was launched!")
local particle = fb:WaitForChild("ParticleEmitter")
particle.LockedToPart = false
particle.Rate = 300
local bv = Instance.new("BodyVelocity", fb)
bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.Velocity = mouse.Hit.lookVector * 350
print(player.Name .. "'s fireball BodyVelocity was created!")
game.Debris:AddItem(fb, 1.5)
fb.Touched:connect(function(part)
local vhum = part.Parent:findFirstChild("Humanoid")
if vhum and vhum.Health > 0 and vhum ~= hum then
vhum:TakeDamage(damage)
for x = 1,10 do
local cfb = fb:Clone()
cfb.Parent = game.Workspace
cfb.Position = fb.Position
cfb.BodyVelocity.Velocity = Vector3.new(flyoffvals[math.random(1, #flyoffvals)], flyoffvals[math.random(1, #flyoffvals)], flyoffvals[math.random(1, #flyoffvals)])
game.Debris:AddItem(cfb, 1.5)
end
fb:Destroy()
elseif part.Anchored == true and part.CanCollide == true then
for x = 1,10 do
local cfb = fb:Clone()
cfb.CFrame = fb.CFrame
cfb.BodyVelocity.Velocity = Vector3.new(flyoffvals[math.random(1, #flyoffvals)], flyoffvals[math.random(1, #flyoffvals)], flyoffvals[math.random(1, #flyoffvals)])
game.Debris:AddItem(cfb, 1.5)
end
fb:Destroy()
end
end)
end)
I'm getting the error at line 19. I'm getting the player's mouse using "player:GetMouse()" inside the local script. All help is appreciated very, very much. Thanks :} ~Loughdough

5 comments
I don't see local mouse=game.Players.LocalPlayer:GetMouse() at the top of this script
@DanzLua I said it was in the local script...?
@LoughDough its not in a localscript?
That isn't the local script. Actually READ what I said. Someone already answered the question anyways so it doesn't matter.
@LoughDough don't be rude to someone who's trying to help you