|
| 12 Oct 2011 08:27 PM |
When i start time on roblox studio it crashes, it only happens when i have the script running.
~~Disabled robloxian is weird.~~ |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 12 Oct 2011 08:30 PM |
What script? It sounds like it's an infinite loop.
2 Floodchecks. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 08:31 PM |
Its based on a defence bot, it is a repeat script that checks players, gets their character, and makes a part that it can shoot at them!
~~Disabled robloxian is weird.~~ |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
| |
|
|
| 12 Oct 2011 08:34 PM |
while true do local Targets = game.Players:GetPlayers() for i = 1, #Targets do local Target = Targets[i].Character.Torso local Bullet = Instance.new("Part") Bullet.CanCollide = false Bullet.formFactor = ("Custom") Bullet.Parent = game.Workspace Bullet.Size = Vector3.new(0.2, 1, 1) Bullet.BrickColor = BrickColor.new("Really red") Bullet.Reflectance = 0 Bullet.Transparency = 1 Bullet.Position = script.Parent.Position + Vector3.new(0,3,0) local b = Instance.new("BodyVelocity") b.velocity = Target.Position b.Parent = Bullet local mesh = Instance.new("SpecialMesh") mesh.MeshType = ("Sphere") mesh.Parent = Bullet local fire = script.Parent.Fire:clone() fire.Parent = Bullet local Bolt = script.Lasers:clone() Bolt.Parent = Bullet Bolt.Disabled = false wait(2) Bullet:Remove() wait(5) end end
~~Disabled robloxian is weird.~~ |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 08:34 PM |
| Does it have a while true do, but no wait(number here)? That causes crashes. |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 12 Oct 2011 08:35 PM |
| Replace 'while true do' with 'while wait() do'. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 08:35 PM |
The script is posted here :o.
~~Disabled robloxian is weird.~~ |
|
|
| Report Abuse |
|
|
salem9
|
  |
| Joined: 25 Oct 2008 |
| Total Posts: 23312 |
|
|
| 12 Oct 2011 08:35 PM |
You don't have any ends that are within the while true do function, so it crashes.
wait(5) end end
will crash.
end wait(5) end
Won't. Or it shouldn't, if I'm thinking right. :P "The problem with quotes on the internet is that you can't tell if they're true or not." - Abraham Lincoln |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 12 Oct 2011 08:36 PM |
| Spectrum's right, when Studio runs there are no players so the for loop never runs; therefore the waits never do either. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 08:37 PM |
Spectrums answer fixed it, Thank you!
~~Disabled robloxian is weird.~~ |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 08:39 PM |
Im going to put it up for free use!
~~Disabled robloxian is weird.~~ |
|
|
| Report Abuse |
|
|