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 » Game Design
Home Search
 

Re: SCRIPT (HELP!)

Previous Thread :: Next Thread 
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
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
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
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
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 05:55 PM
bump
Report Abuse
orsta is online. orsta
Joined: 25 Nov 2012
Total Posts: 79
22 Nov 2014 06:01 PM
What is it supposed to be?
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
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
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 06:59 PM
bump1
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 08:04 PM
bump2
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 08:18 PM
bump3
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 08:42 PM
bump 4
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 09:05 PM
bump5
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 09:48 PM
bump6
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 11:06 PM
bump7
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 11:37 PM
bump8
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
22 Nov 2014 11:42 PM
bump9
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
23 Nov 2014 01:06 AM
bump 10
Report Abuse
GunsBullets is online. GunsBullets
Joined: 01 May 2011
Total Posts: 218
23 Nov 2014 01:08 AM
Poor soul.
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
23 Nov 2014 01:29 AM
bump 1 1
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
23 Nov 2014 01:54 AM
bump12
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
23 Nov 2014 02:30 AM
bump13
Report Abuse
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
23 Nov 2014 01:41 PM
bump14
Report Abuse
maxomega3 is not online. 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 is not online. 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
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
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
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
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
JoshOctober16 is online. JoshOctober16
Joined: 07 Aug 2010
Total Posts: 375
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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