move script inside it or paste inside GunScript_Server? @slendarcoolfan
it doesn’t work, please fix it fast,i will give you 10 robux @slendarcoolfan
Here is screen of 2 person test
and here is place i put it
And here is script GunScript_Server
local Handle = Tool:WaitForChild("Handle")
--local Player
--local Character
--local Humanoid
local Module = require(Tool:WaitForChild("Setting"))
local ChangeMagAndAmmo = script:WaitForChild("ChangeMagAndAmmo")
local Grip2
local Handle2
if Module.DualEnabled then
Handle2 = Tool:WaitForChild("Handle2",1)
if Handle2 == nil and Module.DualEnabled then error("\"Dual\" setting is enabled but \"Handle2\" is missing!") end
end
local MagValue = script:FindFirstChild("Mag") or Instance.new("NumberValue",script)
MagValue.Name = "Mag"
MagValue.Value = Module.AmmoPerMag
local AmmoValue = script:FindFirstChild("Ammo") or Instance.new("NumberValue",script)
AmmoValue.Name = "Ammo"
AmmoValue.Value = Module.LimitedAmmoEnabled and Module.Ammo or 0
if Module.IdleAnimationID ~= nil or Module.DualEnabled then
local IdleAnim = Instance.new("Animation",Tool)
IdleAnim.Name = "IdleAnim"
IdleAnim.AnimationId = "rbxassetid://"..(Module.DualEnabled and 53610688 or Module.IdleAnimationID)
end
if Module.FireAnimationID ~= nil then
local FireAnim = Instance.new("Animation",Tool)
FireAnim.Name = "FireAnim"
FireAnim.AnimationId = "rbxassetid://"..Module.FireAnimationID
end
if Module.ReloadAnimationID ~= nil then
local ReloadAnim = Instance.new("Animation",Tool)
ReloadAnim.Name = "ReloadAnim"
ReloadAnim.AnimationId = "rbxassetid://"..Module.ReloadAnimationID
end
if Module.ShotgunClipinAnimationID ~= nil then
local ShotgunClipinAnim = Instance.new("Animation",Tool)
ShotgunClipinAnim.Name = "ShotgunClipinAnim"
ShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.ShotgunClipinAnimationID
end
if Module.HoldDownAnimationID ~= nil then
local HoldDownAnim = Instance.new("Animation",Tool)
HoldDownAnim.Name = "HoldDownAnim"
HoldDownAnim.AnimationId = "rbxassetid://"..Module.HoldDownAnimationID
end
if Module.EquippedAnimationID ~= nil then
local EquippedAnim = Instance.new("Animation",Tool)
EquippedAnim.Name = "EquippedAnim"
EquippedAnim.AnimationId = "rbxassetid://"..Module.EquippedAnimationID
end
if Module.AimingAnimationID ~= nil then
local AimAnim = Instance.new("Animation",Tool)
AimAnim.Name = "AimAnim"
AimAnim.AnimationId = "rbxassetid://"..Module.AimingAnimationID
end
ChangeMagAndAmmo.OnServerEvent:connect(function(Player,Mag,Ammo)
MagValue.Value = Mag
AmmoValue.Value = Ammo
end)
Tool.Equipped:connect(function()
--Player = game.Players:GetPlayerFromCharacter(Tool.Parent)
--Character = Tool.Parent
--Humanoid = Character:FindFirstChild("Humanoid")
if Module.DualEnabled and workspace.FilteringEnabled then
Handle2.CanCollide = false
local LeftArm = Tool.Parent:FindFirstChild("Left Arm") or Tool.Parent:FindFirstChild("LeftHand")
local RightArm = Tool.Parent:FindFirstChild("Right Arm") or Tool.Parent:FindFirstChild("RightHand")
if RightArm then
local Grip = RightArm:WaitForChild("RightGrip",0.01)
if Grip then
Grip2 = Grip:Clone()
Grip2.Name = "LeftGrip"
Grip2.Part0 = LeftArm
Grip2.Part1 = Handle2
--Grip2.C1 = Grip2.C1:inverse()
Grip2.Parent = LeftArm
end
end
end
end)
Tool.Unequipped:connect(function()
if Module.DualEnabled and workspace.FilteringEnabled then
Handle2.CanCollide = true
if Grip2 then Grip2:Destroy() end
end
end)
for i,v in pairs (script.Parent["GunScript_Local"].GunGUI:GetChildren()) do
if v.Name == "Credits" then
if v.Text == "Lunno's Weapons V4: Made by Lunno & pocket_dimension" then
else break
end
else break
end
end```
This is the entire script? I don’t see where the damage is taken. Can you post the model here?
@AC_Starmarine
Here is screen of 2 person test
and here is place i put it
And here is script GunScript_Server
local Handle = Tool:WaitForChild("Handle")
--local Player
--local Character
--local Humanoid
local Module = require(Tool:WaitForChild("Setting"))
local ChangeMagAndAmmo = script:WaitForChild("ChangeMagAndAmmo")
local Grip2
local Handle2
if Module.DualEnabled then
Handle2 = Tool:WaitForChild("Handle2",1)
if Handle2 == nil and Module.DualEnabled then error("\"Dual\" setting is enabled but \"Handle2\" is missing!") end
end
local MagValue = script:FindFirstChild("Mag") or Instance.new("NumberValue",script)
MagValue.Name = "Mag"
MagValue.Value = Module.AmmoPerMag
local AmmoValue = script:FindFirstChild("Ammo") or Instance.new("NumberValue",script)
AmmoValue.Name = "Ammo"
AmmoValue.Value = Module.LimitedAmmoEnabled and Module.Ammo or 0
if Module.IdleAnimationID ~= nil or Module.DualEnabled then
local IdleAnim = Instance.new("Animation",Tool)
IdleAnim.Name = "IdleAnim"
IdleAnim.AnimationId = "rbxassetid://"..(Module.DualEnabled and 53610688 or Module.IdleAnimationID)
end
if Module.FireAnimationID ~= nil then
local FireAnim = Instance.new("Animation",Tool)
FireAnim.Name = "FireAnim"
FireAnim.AnimationId = "rbxassetid://"..Module.FireAnimationID
end
if Module.ReloadAnimationID ~= nil then
local ReloadAnim = Instance.new("Animation",Tool)
ReloadAnim.Name = "ReloadAnim"
ReloadAnim.AnimationId = "rbxassetid://"..Module.ReloadAnimationID
end
if Module.ShotgunClipinAnimationID ~= nil then
local ShotgunClipinAnim = Instance.new("Animation",Tool)
ShotgunClipinAnim.Name = "ShotgunClipinAnim"
ShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.ShotgunClipinAnimationID
end
if Module.HoldDownAnimationID ~= nil then
local HoldDownAnim = Instance.new("Animation",Tool)
HoldDownAnim.Name = "HoldDownAnim"
HoldDownAnim.AnimationId = "rbxassetid://"..Module.HoldDownAnimationID
end
if Module.EquippedAnimationID ~= nil then
local EquippedAnim = Instance.new("Animation",Tool)
EquippedAnim.Name = "EquippedAnim"
EquippedAnim.AnimationId = "rbxassetid://"..Module.EquippedAnimationID
end
if Module.AimingAnimationID ~= nil then
local AimAnim = Instance.new("Animation",Tool)
AimAnim.Name = "AimAnim"
AimAnim.AnimationId = "rbxassetid://"..Module.AimingAnimationID
end
ChangeMagAndAmmo.OnServerEvent:connect(function(Player,Mag,Ammo)
MagValue.Value = Mag
AmmoValue.Value = Ammo
end)
Tool.Equipped:connect(function()
--Player = game.Players:GetPlayerFromCharacter(Tool.Parent)
--Character = Tool.Parent
--Humanoid = Character:FindFirstChild("Humanoid")
if Module.DualEnabled and workspace.FilteringEnabled then
Handle2.CanCollide = false
local LeftArm = Tool.Parent:FindFirstChild("Left Arm") or Tool.Parent:FindFirstChild("LeftHand")
local RightArm = Tool.Parent:FindFirstChild("Right Arm") or Tool.Parent:FindFirstChild("RightHand")
if RightArm then
local Grip = RightArm:WaitForChild("RightGrip",0.01)
if Grip then
Grip2 = Grip:Clone()
Grip2.Name = "LeftGrip"
Grip2.Part0 = LeftArm
Grip2.Part1 = Handle2
--Grip2.C1 = Grip2.C1:inverse()
Grip2.Parent = LeftArm
end
end
end
end)
Tool.Unequipped:connect(function()
if Module.DualEnabled and workspace.FilteringEnabled then
Handle2.CanCollide = true
if Grip2 then Grip2:Destroy() end
end
end)
for i,v in pairs (script.Parent["GunScript_Local"].GunGUI:GetChildren()) do
if v.Name == "Credits" then
if v.Text == "Lunno's Weapons V4: Made by Lunno & pocket_dimension" then
else break
end
else break
end
end```
This too
here is script inside it
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Beta" then -- If HittedPlayer is On Team Grey
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Security" then -- If HittedPlayer is On Team White (Ally)
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Prison" then -- If HittedPlayer is On Team Orange
PlayerHitted.Character:FindFristChildOfClass("Humanoid"):TakeDamage(0)
end```