Hey, I was working on a third-person animation for a game using a rig, but I’m having an issue. If you can see this video, it was the direct result of this script section:
game.ReplicatedStorage.Events.LoadSlot.OnServerEvent:Connect(function(player, item, FireSoundID, SlidePullSoundID, SlideReleaseSoundID)
if player.Character then
local weapons = game.ReplicatedStorage.Weapons
for i,v in pairs(player.Character:GetChildren()) do
if v:IsA("Model") and weapons:FindFirstChild(v.Name) then
v:Destroy()
end
end
if weapons:FindFirstChild(item) then
local gun = weapons:FindFirstChild(item):Clone()
gun.Parent = player.Character
local joint = Instance.new("Motor6D")
joint.Parent = gun
joint.Part0 = player.Character:FindFirstChild("RightHand")
joint.Part1 = gun.PrimaryPart
end
end
end
end)
It works on other weapons, but I want to modify this script to exclude specific weapons based on their firemode from the module script, particularly bolt actions or names of a specific weapon.
Is there a way for me to do that?
Thanks, and let me know if you need other scripts.