--local script
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local input = game:GetService("UserInputService")
local remote = game.ReplicatedStorage.Mera2
local mouse = plr:GetMouse()
local db = true
input.InputBegan:Connect(function(key, gameprocced)
if key.KeyCode == Enum.KeyCode.R and not gameprocced then
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=02623591753"
local animtrack = game.workspace[plr.Name].Humanoid:LoadAnimation(anim)
animtrack:Play()
remote:FireServer(mouse, db)
wait(2)
db = false
end
end)
--normal script
local remote = game.ReplicatedStorage.Mera2
remote.OnServerEvent:Connect(function(plr, char, mouse, db)
local dmg = false
db = true
local f = Instance.new("Part")
f.Shape = "Block"
f.CanCollide = false
f.Anchored = false
f.Material = "Neon"
f.BrickColor = BrickColor.new("Really red")
f.CFrame = plr.Character["Right Arm"].CFrame * CFrame.new(-3,0,-3)
f.Parent = game.Workspace
f.Size = Vector3.new(0.60,0.60,2)
f.Transparency = 0.8
local FP = game.ReplicatedStorage.BF:Clone()
FP.Parent = f
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = mouse.Hit.plr.lookVector*90
BV.Parent = f
f.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hit.Parent:FindFirstChild("Humanoid") == nil then return end
if dmg == false then
dmg = true
if hum.Parent == char then
hum.Health = hum.Health - 0
else
hum.Health = hum.Health - 25
end
end
end)
wait(2)
f:Destroy()
db = false
end)
how do i make it so it fires to where ur mouse is located at if u know what i mean this is the error: local remote = Players.Darkwolfgameryr.Backpack.FireBullets.Asset:19: attempt to index local 'mouse' (a boolean value)
