of     1   

MightyWanderer
#50086933Thursday, July 07, 2011 4:46 PM GMT

Title asks all.
Lamboreborn
#50090692Thursday, July 07, 2011 5:44 PM GMT

Yes. When we play games and have guns, we are humanoids so yes.
MightyWanderer
#50103753Thursday, July 07, 2011 9:10 PM GMT

No, I mean NPC Humanoids.
citymaster22
#50104136Thursday, July 07, 2011 9:15 PM GMT

Sure. But whose gonna control when they shoot? They won't click. So you have to make it automated.
PsychoBob
#50106667Thursday, July 07, 2011 9:52 PM GMT

They should be able to, somehow, but that's some pretty advanced scripting right there. I'm not sure this would work, but it would be something along the lines of this. -Detect if humanoid enters range of gun -Pinpoint the humanoid -Shoot at the humanoid -Detect if humanoid is dead else keep shooting -Detect if humanoid is outside range else keep shooting -Repeat until humanoid is dead or outside range
Vallindell
#50107096Thursday, July 07, 2011 9:59 PM GMT

If you were a very talented A.I. programmer you could do it.I have only seen one thing like it, which were some Portal turrets that would shoot when you entered range and keep shooting until you died or exitted range.
AboveAwesome
#50107763Thursday, July 07, 2011 10:09 PM GMT

First, make a script inside the turret like so. turretthingy = script.Parent distance = 30 function getHumans() for _, v in pairs(game.Players:GetChildren()) do if v.Character ~= nil and v.Character:FindFirstChild("Torso") ~= nil and v.Character:FindFirstChild("Humanoid") ~= nil and v.Character.Humanoid.Health > 0 then if (v.Character.Torso.Position - turretthingy.[TurretBrickName].Position).magnitude <= 80 then return v.Character.Torso end end end return nil end function aim(targ) local dir = targ.Position - script.Parent.Barrel.Position dir = computeDirection(dir) local mag = (targ.Position - script.Parent.[TurretMainBrickName].Position).magnitude local spawnPos = script.Parent.Barrel.Position local pos = spawnPos + (dir * (math.ceil(mag)/2)) bin.Barrel.BodyGyro.cframe = CFrame.new(pos, pos + dir) local look = turretthingy.[TurretBrickName].CFrame.lookVector local p = Instance.new("Part") p.formFactor = "Symmetric" p.Size = Vector3.new(1,1,1) p.TopSurface = "Smooth" p.Shape = "Ball" p.BottomSurface = "Smooth" p.Name = "Bullet" p.BrickColor = BrickColor.new("Really Black") p.CFrame = script.Parent.Shooter.CFrame + (1.5*look) local b = Instance.new("BodyVelocity") b.velocity = (50*look) b.Parent = p p.Parent = workspace local sc = script.Damage:clone() sc.Disabled = false sc.Parent = p end function computeDirection(vec) local lenSquared = vec.magnitude * vec.magnitude local invSqrt = 1 / math.sqrt(lenSquared) return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) end while true do wait(0.2) local target = getHumans() if target ~= nil then aim(target) end end Then, add a damage script inside, i.e. game:GetService("Debris"):AddItem(script.Parent, 4) deb = false function TACO(h) if h.Parent ~= nil and h.Parent:FindFirstChild("Humanoid") ~= nil then if deb == false then deb = true h.Parent.Humanoid:TakeDamage(Whatever damage you want.) wait() script.Parent:remove() end end end script.Parent.Touched:connect(TACO)
HillariousPie
#50116014Friday, July 08, 2011 12:23 AM GMT

One Word: Yes.
MightyWanderer
#50117409Friday, July 08, 2011 12:44 AM GMT

@ AboveAwesomeness Wow. Thanks. So how would the turret have to be built for the script to work?

    of     1