Issue with guns

so im trying to figure out what’s wrong with my gun because its not working correctly?

Problem - When i get a gun any gun it wont show up so i change my character to R6 where you can see it in first person but when i try to kill one of my zombies after the health bar goes down on the zombie it takes 15 seconds to actually kill it and when i test it after i publish it my team can not see my gun to them im holding nothing

1 Like

show us your script and videos and screenshots of whats happening, or we won’t be able to help you.

It shows I’m holding nothing in the zombie turned invisible every time I kill it it responds back invisible for like 30 seconds and I’m not sure why I randomly found a zombie in the library so there are scripts everywhere

You still need to show us the script. We can’t tell what’s happening or how it what is happening is being executed from a single image.

theres 4 scripts give me just a sec

heres the main script

local larm = script.Parent:FindFirstChild(“HumanoidRootPart”)
local rarm = script.Parent:FindFirstChild(“HumanoidRootPart”)

function findNearestTorso(pos)
local list = game.Workspace:children()
local torso = nil
local dist = 10000
local temp = nil
local human = nil
local temp2 = nil
for x = 1, #list do
temp2 = list[x]
if (temp2.className == “Model”) and (temp2 ~= script.Parent) then
temp = temp2:findFirstChild(“HumanoidRootPart”)
human = temp2:findFirstChild(“Humanoid”)
if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
if (temp.Position - pos).magnitude < dist then
torso = temp
dist = (temp.Position - pos).magnitude
end
end
end
end
return torso
end

while true do
wait(1)
local target = findNearestTorso(script.Parent.HumanoidRootPart.Position)
if target ~= nil then
script.Parent.Zombie:MoveTo(target.Position, target)
end

end

z = script.Parent

backup = z:clone()

while true do
wait(5)
if z.Zombie.Health == 0 then
z:Remove()
wait(4)
backup.Parent = game.Workspace
backup.Head:MakeJoints()
backup.Torso:MakeJoints()
end
if z == nil then
wait(4)
backup.Parent = game.Workspace
backup.Head:MakeJoints()
backup.Torso:MakeJoints()
end
end

that’s the respawn script and the long one is the main one

Is it in a server or localscript?

1 Like

there both in just script not local

Why are you defining HumanoidRootPart Twice?

local larm = script.Parent:FindFirstChild(“HumanoidRootPart”)
local rarm = script.Parent:FindFirstChild(“HumanoidRootPart”)

o ya i forgot to tell you that this is not my script i found it in the library because i have no idea how to make my own

If you want you can just watch this to make a gun.

Probably is helpful.

alright thank you i will watch it the only reason i stopped watching YouTube for scripts because i watch hundreds of videos and only 1 will work out of all of them

Look on the forum for the questions your after most of them are helpful.

alright thank you. Is it ok if i message you if i cant find anything that will help?

Yeah ill be free to dm. Message me if youd like.