|
| 22 Nov 2014 04:35 PM |
First I want to say my workspace looks like this workspace.Regen.Scour workspace.Regen.Scour
workspace.Model.Script workspace.Model.ScriptsGroundscour <-- this is the script I need fixing workspace.Model.Head
workspace.BasePlate
and in ReplicatedStorage ReplicatedStorage.Scour
In ScriptsGroundscour
local hole = script.Parent for index, child in pairs(workspace.Regen:GetChildren()) do print(index, child.Name) wait(1) if (hole.Head.Position - child.Position).magnitude > 100 then m=Instance.new("Part") m.Size = Vector3.new(0.2, 0.2, 0.2) m.Name = "Scour" m.Parent = game.Workspace.Regen m.Position = hole.Head.Position mo1 = Instance.new("BlockMesh") mo1.Parent = m mo1.Scale = Vector3.new(200, 1, 200) mo = Instance.new("Decal") mo.Parent = m mo.Name = "DecalGroundScour" mo.Texture = "http://www.roblox.com/asset/?id=177001362" mo.Face = "Top" mo.Transparency = 1 wait(0.1) xp = m.Position.x zp = m.Position.z m.Position = Vector3.new(xp, 47.398, zp) mo.Transparency = 0.9 wait(0.1) mo.Transparency = 0.8 wait(0.1) mo.Transparency = 0.7 wait(0.1) mo.Transparency = 0.6 wait(0.1) mo.Transparency = 0.5 wait(0.1) mo.Transparency = 0.4 wait(0.1) mo.Transparency = 0.3 wait(0.2) mo.Transparency = 0.2 wait(0.2) mo.Transparency = 0.1 wait(0.2) mo.Transparency = 0 wait() script.Disabled = true end wait(1) script.Disabled = true end
In Script
while true do wait(1) script.Parent.ScriptsGroundscour.Disabled = false end
the only broken thing and ive been trying for days is that it seems to be ignoreing the new Scour that the script adds in Regen
is there a way to fix this? I need it fix cuz it makes lag from ignoreing the new bricks it just added. |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2014 04:49 PM |
| ive been waiting for more then 20 hr for the old post I made and still nothing |
|
|
| Report Abuse |
|
|
| |
|
orsta
|
  |
| Joined: 25 Nov 2012 |
| Total Posts: 79 |
|
|
| 22 Nov 2014 06:01 PM |
| What is it supposed to be? |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2014 06:24 PM |
a script that spawns dirt from a transparent brick that has a decal im using it for my tornado simulator when the tornado is strong enugth it should start to rip the grass out and show dirt , but its mostly spaming it over at one same place so I want it if theres that brick nere it it dsont spawn a new one until its far away from it |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 23 Nov 2014 01:53 PM |
Condense: mo.Transparency = 0.9 wait(0.1) mo.Transparency = 0.8 wait(0.1) mo.Transparency = 0.7 wait(0.1) mo.Transparency = 0.6 wait(0.1) mo.Transparency = 0.5 wait(0.1) mo.Transparency = 0.4 wait(0.1) mo.Transparency = 0.3 wait(0.2) mo.Transparency = 0.2 wait(0.2) mo.Transparency = 0.1 wait(0.2) mo.Transparency = 0
into: for i = 9,0,-1 do mo.Transparency = i/10 wait (.2) end
wiki.roblox.com/index.php?title=Writing_Clean_Code |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 23 Nov 2014 01:54 PM |
"while true do otherscript.Disabled = false end"
unless the other script is constantly being disabled, that loop is entirely unecessary |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2014 02:29 PM |
the other script is
while true do wait(1) script.Parent.ScriptsGroundscour.Disabled = false end
and the thing that needs fixing is that if there are any brick name Scour that are nere this scripts brick Including the one it just adds it wont spawn any until its far enugth from all of them. cuz when I play test it it works fine for the first brick but when it spawns the 2 one it keeps on ignoreing that its nere it |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2014 04:12 PM |
wait what script are you telling I should add the
"while true do otherscript.Disabled = false end"
line in? |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2014 04:26 PM |
ive tryd lots of stuff and it ignores most of the bricks
even when using this one I just made
local children = workspace.Regen:GetChildren() local hole = script.Parent.Head for i = 1, #children do print(i, children[i].Name) end wait(1) local i = 1, #children local posDiff = Vector3.new(hole.Position.x - i, children[i].Position.x,hole.Position.y - i, children[i].Position.y,hole.Position.z - i, children[i].Position.z) if posDiff.magnitude > 100 then m=Instance.new("Part") m.Size = Vector3.new(0.2, 0.2, 0.2) m.Name = "Scour" m.Parent = game.Workspace.Regen m.Position = hole.Position mo1 = Instance.new("BlockMesh") mo1.Parent = m mo1.Scale = Vector3.new(200, 1, 200) mo = Instance.new("Decal") mo.Parent = m mo.Name = "DecalGroundScour" mo.Texture = "http://www.roblox.com/asset/?id=177001362" mo.Face = "Top" mo.Transparency = 1 wait(0.1) xp = m.Position.x zp = m.Position.z m.Position = Vector3.new(xp, 47.398, zp) for i = 9,0,-1 do mo.Transparency = i/10 wait (.2) end wait() script.Disabled = true end wait(1) script.Disabled = true
|
|
|
| Report Abuse |
|
|