|
| 11 Jul 2012 04:12 PM |
wait(5)
local W,L = game.Workspace,game.Lighting
function isClear(plane) local size = plane:GetModelSize() local pos = plane:GetModelCFrame().p local v1 = (pos-(size/2)) local v2 = (pos+(size/2)) local region = Region3.new(v1,v2) local parts = W:FindPartsInRegion3(region) return (#parts == 0 and true or false) end
function main(plane) local copy = plane:Clone() plane.Weld.Cloned.Value = true while wait(5) do if (isClear(copy)) then local new = copy:Clone() new.Parent = W new:MakeJoints() new.Weld.Cloned.Value = true plane = new end end end
function getPlanes() for _,v in pairs(W:GetChildren()) do if (v.Name == "Plane") then delay(0,function() main(v) end) end end end
getPlanes() |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 04:19 PM |
| I really can't figure out why, it looks legitimate, but you can use crazyman32's script he used to regenerate his planes. Maybe, it's the delay, or maybe this need to goes in the the opposite script that it's in(Example: if it's in a LocalScript put it in a Normal Script, or vise versa). |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 04:42 PM |
| This script is in Workspace. This ONE script regens all planes when nothing is in its region it creates. Only works in Play Solo and when I do Start Server > Start Player, it works.... But not online... |
|
|
| Report Abuse |
|
|
ashispro
|
  |
| Joined: 14 Sep 2008 |
| Total Posts: 452 |
|
|
| 11 Jul 2012 05:13 PM |
| its probs cause you're fat |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Jul 2012 06:28 PM |
| ash, nice rack you got there, XD. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 10:36 PM |
| We are getting off topic... |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 11 Jul 2012 10:43 PM |
> return (#parts == 0 and true or false)
That is exactly the same as
return #parts==0
What does your script do in-game? Does it do nothing at all? Does it give off an error?
Also a good tool that I always use for testing games online is this :
http://www.roblox.com/--item?id=65774258
I do not know if you are currently using that or not however you should be, makes your life a lot easier :P |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 07:58 PM |
| It doesn't do anything. Gives no errors and works in Play Solo and Test > Start Server > Start Player. But does NOT works online. |
|
|
| Report Abuse |
|
|
| |
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 12 Jul 2012 08:05 PM |
| It gives no output online but still doesn't work? |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 08:15 PM |
| I just found out that it works, but just doesn't clone and parent it to workspace. |
|
|
| Report Abuse |
|
|
ChibiNico
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 2304 |
|
|
| 12 Jul 2012 08:17 PM |
@ray You can't see the output online |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 08:19 PM |
| I've used Crazyman32's regen button and all I could find on free models. ALL work except the part where it clones it and parents it to Workspace. |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 12 Jul 2012 08:20 PM |
@chibi
ehem...
> Also a good tool that I always use for testing games online is this : http://www.roblox.com/--item?id=65774258 I do not know if you are currently using that or not however you should be, makes your life a lot easier :P
|
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 12 Jul 2012 08:51 PM |
Rather then using your variable why not do new.Parent = game.Workspace
It just seems more thorough that way.
~ siggy ~ umg take my retexture http://www.roblox.com/Gold-Fish-V10-item?id=84923916 ~ siggy ~ |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 08:52 PM |
| I did cuz I am lazy lol. But the regen buttons I got off insert to see if they worked, and they do using game.Workspace. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 08:53 PM |
| I mean the buttons off insert do not work, either. |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 12 Jul 2012 08:55 PM |
Wait... you confused me. What is the current problem?
~ siggy ~ umg take my retexture http://www.roblox.com/Gold-Fish-V10-item?id=84923916 ~ siggy ~ |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 08:56 PM |
| The problem is that it does not clone and parent it to Workspace on ONLINE mode. The script doesn't even break. It works in Play Solo and Test > Start Server > Start Player. |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 12 Jul 2012 08:57 PM |
| whether you use W or game.Worspace shouldn't make a difference. Most likely the problem comes with something falling inside of the region3 box or the fact that values such as CFrame's and Vector3's are less accurate online than they are in studio mode. Try adding another check to the isClear function to make sure that the parts found are descendants of plane. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 09:02 PM |
| But the old-fashioned regen buttons don't even work. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 09:04 PM |
| I just tried a few of my OLD planes, and it still does not regen! D: |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 12 Jul 2012 09:05 PM |
| So the plane is just staying in nil or is it being copied to workspace? |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 09:05 PM |
| It's like the whole ":Clone" feature is broken on the game! D: |
|
|
| Report Abuse |
|
|