|
| 17 Jul 2014 12:59 AM |
I need some help with a script that spawns a part at a location 10 times with a 5 second interval before each spawning. I have gotten the script to "know" what the part I am requesting to spawn is like and it's location, but I have yet to actually have the script successfully spawn it. I have studied some tools' scripts like the Time Bomb and the Rocket Launcher to see how they create the new object in the workplace, but they all use the player's location and the target of the mouse, while I need to use a static location. Basically, I need help with getting the script to make the part. Bear in mind I have 3 days of scripting experience.
Here is the script I have made so far:
-----beginning of script----- function spawn() local part = Instance.new ("Part") part.BackSurface = 0 part.BottomSurface = 0 part.FrontSurface = 0 part.LeftSurface = 0 part.RightSurface = 0 part.TopSurface = 0 part.BrickColor = BrickColor.new(17) part.FormFactor = 1 part.Size = Vector3.new (4, 1.2, 2) part.Position = Vector3.new (0, 8, 0) part.Name = "SpawnedPart" part.Anchored = false end
for spawncounter = 1, 10 do wait (5) spawn() end -----end of script----- |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 17 Jul 2014 01:02 AM |
| you didn't set the Parent of the part? |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 17 Jul 2014 01:03 AM |
change this
local part = Instance.new ("Part")
to this
local part = Instance.new ("Part", game.Workspace) |
|
|
| Report Abuse |
|
|
Fidgeting
|
  |
| Joined: 08 Feb 2014 |
| Total Posts: 1193 |
|
|
| 17 Jul 2014 01:05 AM |
local part = Instance.new ("Part", game.Workspace)
you forgot to add game.Workspace.
the part didn't have a place to spawn in. |
|
|
| Report Abuse |
|
|
| |
|