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 » Scripting Helpers
Home Search
 

Re: Auto Deleting Enemys

Previous Thread :: Next Thread 
Jma88 is not online. Jma88
Joined: 06 Jun 2009
Total Posts: 479
04 Jun 2013 10:10 PM
This is what I need, an enemy called a "troll" that walks around and occasionally deletes bricks around it. Help would be appreciated.
Report Abuse
Usering is online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
04 Jun 2013 10:15 PM
Cool, give us your non functional script so we can fix it. If you don't have one, make one or leave.

~ Usering ~
Report Abuse
BJCarpenter is online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
04 Jun 2013 10:39 PM
If u want to mod one, take "Speed AI", AIScript then add an
elseif Hit.Parent.Name == "DeleteableBrick" or Hit.Parent.Name == "Ugly wart" then
Hit:remove() -- or something else u wanna do

.
.
.

function FireRayToward() -- possible path, and read the Part we hit, if any.
ClimbingLadder = false

local originPrime = origin * Vector3.new(.8,0,0) - Vector3.new(0,.4,0) -- Offset Right + OffY
local offset = origin * Vector3.new(.8,0,0) - origin * Vector3.new(-.8,0,0) -- left (I guess this is increment. I didn't WANT to do it this way)
local point = origin.lookVector * 7 -- dir
local pointPrime = point - offset + Vector3.new(0,2,0) -- dir + OffsetLeft + OffsetY = direction of Ray

local Hit = DrawRay(originPrime, pointPrime) -- see if we hit anything

if Hit then

if target.Parent == Hit.Parent then
-- AI.Head:BreakJoints()
if Hit.Name ~= "Torso" and Hit.Name ~= "Head" then
Hit:BreakJoints()
Hit.CanCollide = true
else
Hit.Parent.Humanoid:TakeDamage(15)
end -- kill

Logic = 0
Hit = nil

--HERE

elseif Hit.Parent.Name == AIName then
.
.
.
Report Abuse
BJCarpenter is online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
04 Jun 2013 10:42 PM
*sorry
elseif Hit.Parent.Name == "DeleteableModel" or Hit.Name == "DeleteablePart" then
Report Abuse
Jma88 is not online. Jma88
Joined: 06 Jun 2009
Total Posts: 479
04 Jun 2013 11:03 PM
Carpenter, I don't quite understand.
Report Abuse
BloxAdventure is not online. BloxAdventure
Joined: 04 Mar 2013
Total Posts: 395
04 Jun 2013 11:06 PM
@usering Not cool. You're obviously a forum troll. Get out.
Report Abuse
BJCarpenter is online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
04 Jun 2013 11:14 PM
Yes u do.
Report Abuse
Jma88 is not online. Jma88
Joined: 06 Jun 2009
Total Posts: 479
05 Jun 2013 12:05 AM
I know basically nothing about scripting.
Report Abuse
Jma88 is not online. Jma88
Joined: 06 Jun 2009
Total Posts: 479
05 Jun 2013 12:30 AM
Anyone?
Report Abuse
Usering is online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
05 Jun 2013 09:08 AM
@Blox, I'm not a forum troll. These request scripts do not belong here and I'm always helping out people who actually NEED help on this.
Report Abuse
BlueTiger47 is not online. BlueTiger47
Joined: 13 Feb 2010
Total Posts: 60
05 Jun 2013 09:56 AM
For this one you need to name the bricks that can be touched to a specific name. For now we will call it "brick"




function onTouch(Troll)
if Workspace ~= then
local found = Workspace.findFirstChild("Brick")
if found then
game.Workspace.Brick:remove()
end
end

script.Parent.Touched:connect(onTouch)


Just the general idea, not sure if it will work but pretty much what you want the script to do is find the brick and remove it when touched. So I tried to combine a onTouch script with a remove script.
Report Abuse
BJCarpenter is online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
05 Jun 2013 10:25 AM
*I know basically nothing about scripting.....

Yeah I know.
That's why this doesn't belong here, u should be Searching the Catalog, and Testing like nuts....

That's why I a gave you a complete model from the Catalog, and the exact line u need to add.

You may be able to see a forest, if u would stop looking at that tree in front of you,
Brian
Report Abuse
dontbann123 is not online. dontbann123
Joined: 30 Mar 2013
Total Posts: 144
05 Jun 2013 11:15 AM
hai
Report Abuse
miker200000 is not online. miker200000
Joined: 20 Aug 2010
Total Posts: 5
05 Jun 2013 11:24 AM
...
Report Abuse
BloxAdventure is not online. BloxAdventure
Joined: 04 Mar 2013
Total Posts: 395
05 Jun 2013 02:11 PM
I do know what you mean. This kinda belongs in LMaD.
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
05 Jun 2013 02:46 PM
Here's my advice:

Learn to script
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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