generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help Plz

Previous Thread :: Next Thread 
Dejavl1 is not online. Dejavl1
Joined: 05 Feb 2016
Total Posts: 227
14 Jun 2016 02:58 AM
How can I alter this script to attack brick color for team instead of team name
Ty

local larm = script.Parent:FindFirstChild("Left Arm")
local rarm = script.Parent:FindFirstChild("Right Arm")

function findNearestTorso(pos)
local list = game.Workspace:children()
local torso = nil
local dist = 1000 -- < That's how far the zombie can see.
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("Torso") --V This is who the zombie chases.
human = temp2:findFirstChild("RedZombie")
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

function Hit(hit) -- V This is who the zombie hurts(normally the
local human = hit.Parent:FindFirstChild("RedZombie") -- as who he chases.)
if human ~= nil then -- V That's how much health it takes away from it's
human.Health = human.Health -10 -- enemys every time it hits them.
end
end

larm.Touched:connect(Hit)
rarm.Touched:connect(Hit)

while true do
wait(0.1)
local target = findNearestTorso(script.Parent.Torso.Position)
if target ~= nil then
script.Parent.BlueZombie:MoveTo(target.Position, target)
end -- ^ That's the name of the zombie. This is what get's moved to move
end -- towards enemys.
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
14 Jun 2016 04:49 AM
Phrase your question better and I could help.


Learning the language is easy; using it is not.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
14 Jun 2016 04:52 AM
I will not alter a free model for you.
Report Abuse
Dejavl1 is not online. Dejavl1
Joined: 05 Feb 2016
Total Posts: 227
14 Jun 2016 10:16 AM
I actually paid somebody for the script with simple models. If you're telling me it's from a free model, well i got rip off. I wanted the zombies to attack opposite team; blue vs red according to brick color. He ended up making the blue zombies attack only red zombies and not the entire red team.
Report Abuse
Syntropy is not online. Syntropy
Joined: 16 Mar 2009
Total Posts: 2272
14 Jun 2016 10:19 AM
It's a edit of a free model zombie script.
Report Abuse
Dejavl1 is not online. Dejavl1
Joined: 05 Feb 2016
Total Posts: 227
14 Jun 2016 10:25 AM
I don't have much time to sit down and learn while running a business. So I'm willing to pay ppl to help and tweak my game to completion. I'm a gamer and love the idea of making my own games, I just don't have enough time to put aside to learn the language. If this first game is somewhat successful. I can invest more money in the next one.
Report Abuse
Syntropy is not online. Syntropy
Joined: 16 Mar 2009
Total Posts: 2272
14 Jun 2016 10:32 AM
^ Tell me about I. I feel the same way. But it comes to a certain point where you realize paying scripters to get iffy code is unreliable. Then there comes a time where you realize your own code is unreliable so you have to learn more. I'm feeling the second one and I'm also trying to push out games. Your best bet is to get a business partner scripter or learn yourself if you're trying to do all this. I have a dedicated beast of a builder to my games.
Report Abuse
Syntropy is not online. Syntropy
Joined: 16 Mar 2009
Total Posts: 2272
14 Jun 2016 10:35 AM
But to answer the question to your script this line is all the zombie knows to look for.

human = temp2:findFirstChild("RedZombie")

An easy fix would be to change RedZombie to RedTeam and give everything you want chased a value called RedTeam.
Report Abuse
Dejavl1 is not online. Dejavl1
Joined: 05 Feb 2016
Total Posts: 227
14 Jun 2016 02:08 PM
Yeah I'm still looking for a dependable scripter that wanna make some money, but thanx again
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image