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
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
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
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
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