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: How do I add enemies that are a certain model?

Previous Thread :: Next Thread 
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 02:27 PM
I want to add Titans from Attack On Titan to a game for my group ROBLOX Survey Corps as a training area. It'll come with a 3DMG spawner which I know works. Please help, it'd be even better if someone could script for the group
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
28 Oct 2014 02:34 PM
What do you mean? I am so confused. I don't know what you want. Is it a regen script? Or do you mean put them into the game?
Report Abuse
Roblok1 is not online. Roblok1
Joined: 27 Jul 2011
Total Posts: 2019
28 Oct 2014 02:36 PM
@above

yes i agree. what is being said here?
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:19 PM
I want them to spawn in the game and continuously spawn
Report Abuse
KevDesign is not online. KevDesign
Joined: 27 Oct 2014
Total Posts: 51
28 Oct 2014 03:26 PM
I see , you are trying to make a continuous loop of zombies

You will have to use the "while true do" command in Lua.

The script should look something like this


while true do
wait(300) -- Change to how long you want to delay the zombies
game.Lightning.ZOMBIE:Clone()
game.Ligthning.Zombie.Parent = game.Workspace
end


You would have to put a zombie in the parent "Lightning" so it can be cloned into the workspace
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:27 PM
Similar, I'm trying to add a continuous loop of the Titan Model, how would I change the model?
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:34 PM
Also, I have no clue how to use LMM Admin and scripts and that, the best I can do it make a block say 'Hi!'
Report Abuse
KevDesign is not online. KevDesign
Joined: 27 Oct 2014
Total Posts: 51
28 Oct 2014 03:36 PM
And that's professional compared to me, I just started learning.

Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
28 Oct 2014 03:36 PM
What do you mean change the model? why does the model need changing? Do you want different Titans to spawn at random? I need more info.
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:37 PM
I mean 'change the model' so it's not a zombie model, I need it a titan model
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
28 Oct 2014 03:40 PM
while true do
wait(300) -- Change to how long you want to delay the zombies
local Titan = game.ServerStorage.Titan:Clone()
Titan.Parent = game.Workspace
end

Put the Titan model in ServerStorage.

BTW ServerStorage is preferred instead of Lighting because it is secure. You just cant access it from local scripts.
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:42 PM
Thanks major help there but what is the "while true do" part? I'm new to this
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
28 Oct 2014 03:42 PM
Tell me in great detail on what you want. I just started to code LUA about 2 - 4 days ago, but my other programming language (PHP) is similar, so I know enough in LUA.

I will try my best to assist you, so please cooperate.
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:43 PM
Salute, I just need Titans to spawn about 10 every 30 seconds and I am absolutely new to this.
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
28 Oct 2014 03:44 PM
On a chat command, or on start of game?
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:47 PM
Start of a game, I have setup the starter pack, and everything that's needed except the titans
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
28 Oct 2014 03:49 PM
While true do is an infinite loop. it will run for as long as the game is active. If you want the Titans to spawn every 10 seconds, then change wait(300) to wait(10). If you want them to spawn every 15 second, then change wait(300) to wait(15). If you want them to spawn at random times in between 10 and 30 seconds, change wait(300) to wait(math.random(10,30)).
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 03:50 PM
I get that but where do I use the command?
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
28 Oct 2014 03:53 PM
This should work.

while true do
titan = game.ServerStorage.Titan:clone() -- clones titans from ServerStorage
titan.Parent = game.Workspace --Spawns titans into workspace
wait (15000) --Waits 15 seconds (1000 = 1 second)
end
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
28 Oct 2014 03:56 PM
Forgot a bit.
--copy from here--
--Local Variables--
local Px = script.Parent.Position.X
local Py = script.Parent.Position.Y
local Pz = script.Parent.Position.Z

--Loop--
while true do
wait(300) -- Change to how long you want to delay the zombies
local Titan = game.ServerStorage.Titan:Clone()
Titan.Parent = game.Workspace
Titan:MoveTo(Vector3.new(Px,Py,Pz))
end
--to here--

This script goes into a part. It will automatically run.
Report Abuse
iondriver is not online. iondriver
Joined: 18 Nov 2012
Total Posts: 757
28 Oct 2014 03:58 PM
@Salute

Almost

while true do
local titan = game.ServerStorage.Titan:clone() -- clones titans from ServerStorage
titan.Parent = game.Workspace --Spawns titans into workspace
wait (15000) --Waits 15 seconds (1000 = 1 second)
end

Unless you have already defined titan as a Global or a local, it will cause an error. Also this code will just drop the titan at (0,0,0).



Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
28 Oct 2014 03:59 PM
My bad, I forgot, this isn't Javascript. change wait (15000) to wait (15)
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
28 Oct 2014 04:00 PM
local titan = game.ServerStorage.Titan:clone() -- clones titans from ServerStorage

titan is defined here.
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 04:01 PM
Ok, I did what @above said put the parts and everything but it refuses to save my changes,
Report Abuse
KitKat0818 is not online. KitKat0818
Joined: 23 Jul 2014
Total Posts: 32
28 Oct 2014 04:06 PM
Still no save, and when I tested it, no titans spawned. I used the script I was given.
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