|
| 01 Jun 2014 10:17 PM |
while true do wait(5) Instance.new("Part") Part.Parent = game.Workspace Workspace.Part.Position = Vector3.new(72.6, 50.4, -5.5) Workspace.Part.Anchored = true Workspace.Part.Position = Vector3.new(72.6, 50.4, -5.5) game.Workspace.Part.BrickColor = BrickColor.new("Black") Workspace.Part.Size = Vector.new(5.2, 4.8, 5) Workspace.Part.Position = Vector3.new(72.6, 50.4, -5.5) wait(5) Workspace.Part.Anchored = false wait(1) print ("Hello World") end
All I am trying to do is make a brick insert into workspace every few seconds at that location but it doesn't seem to be working. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Jun 2014 10:19 PM |
http://wiki.roblox.com/index.php?title=Variables
while Wait(5) do local Part = Instance.new("Part", Workspace) Part.Anchored = true Part.Position = Vector3.new(72.6, 50.4, -5.5) Part.BrickColor = BrickColor.new("Black") Part.Size = Vector.new(5.2, 4.8, 5) Spawn(function() Wait(5) Workspace.Part.Anchored = false Wait(1) print ("Hello World") end) end |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2014 10:21 PM |
while Wait(5) do local Part = Instance.new("Part", Workspace) Part.Anchored = true Part.Position = Vector3.new(72.6, 50.4, -5.5) Part.BrickColor = BrickColor.new("Black") Part.Size = Vector.new(5.2, 4.8, 5) Spawn(function() Wait(5) Part.Anchored = false Wait(1) print("Hello World") end) end
Would be pretty hard to explain Spawn() effectively, but it would create another thread in which it would change the Anchored property. Otherwise, it would halt the script to unanchor then, unless that's what you wanted... |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2014 10:27 PM |
| Yes I want it to unanchor at the time period and now it is not...How would I go about fixing that? |
|
|
| Report Abuse |
|
|
|
| 01 Jun 2014 10:30 PM |
while Wait(5) do local Part = Instance.new("Part", Workspace) Part.Anchored = true Part.Position = Vector3.new(72.6, 50.4, -5.5) Part.BrickColor = BrickColor.new("Black") Part.Size = Vector.new(5.2, 4.8, 5) Wait(5) Part.Anchored = false Wait(1) print("Hello World") end |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Jun 2014 10:42 PM |
while wait(5) do Part = Instance.new("Part") Part.Parent = Workspace Part.Position = Vector3.new(72.6, 50.4, -5.5) Part.Anchored = true Part.BrickColor = BrickColor.new("Black") Part.Size = Vector.new(5.2, 4.8, 5) wait(5) Part.Anchored = false wait(1) print ("Hello World") end
1. Don't use while true do when you can use while wait() do, it is more efficient 2.You never named the Part. So I recommend keeping it a variable which is Part 3. Why on earth did you keep resizing the brick to the same size over and over? |
|
|
| Report Abuse |
|
|