Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
|
| 24 Jul 2012 04:21 PM |
| add wait(WhateverTimeYouwant) between each. Its better. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2012 04:21 PM |
That's probably the most pointless thing ever :p But it was done correctly, easy to read. |
|
|
| Report Abuse |
|
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
|
| 24 Jul 2012 04:26 PM |
Nah, skipping lines are better to see everything... not a cluster F. this is adding a wait inbetween lines... just in case you didn't know. game.Workspace.Brick.Transparency = 4 wait(1) --blah
|
|
|
| Report Abuse |
|
|
ThatThar
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 794 |
|
|
| 24 Jul 2012 04:26 PM |
while true do wait(1) Part.Locked = false Part.CanCollide = true Part.Anchored = false wait(1) Part.Locked = true Part.CanCollide = false Part.Anchored = true
end
If you don't want it all to happen in the same second, then use the above. Also, you never need to skip lines. It just makes it more organized. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2012 04:26 PM |
Nope You can skip lines or no. It's more like a style as I would say.
|
|
|
| Report Abuse |
|
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
|
| 24 Jul 2012 04:28 PM |
Also, skipping lines adds a 'style' to your code... Like pros do spaces and skips and stuff. Honestly it depends on you. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2012 04:30 PM |
| You can also tab them if you want. It makes it look nicer. |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2012 04:31 PM |
Aaah, I only use tabed when I go into parents with Variables and stuff lol Honestly people can make the most horrible looking code and it work perfectly, while a guy writes it amazing and nothing is right lol |
|
|
| Report Abuse |
|
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
|
| 24 Jul 2012 04:38 PM |
Thats a Variable, thats better to keep it. Like you could do
Brick1 = game.Workspace.Part1
Then something like
Brick1.Position = Vector3.new(5,5,2)
or
Brick1.Parent = game.Lighting |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2012 04:39 PM |
Now brb I got to learn these Lua stuff :
functions function connections Instance.new() Vector3.new() Color3.new() math.random() :Remove() -- :Destroy(). :remove() was :removed() xD
|
|
|
| Report Abuse |
|
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
|
| 24 Jul 2012 04:44 PM |
| If you ever need anything or need some questions, you are welcome to PM me and i'll get back to you as soon as possible. Its just if you need any extra help. |
|
|
| Report Abuse |
|
|
ThatThar
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 794 |
|
|
| 24 Jul 2012 05:03 PM |
| I remember last year when the wiki was probably the worst place to learn to script because it was so outdated. |
|
|
| Report Abuse |
|
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
|
| 24 Jul 2012 05:57 PM |
local Part1 = game.Workspace.Part1 function onTouch() Part1.BrickColor = BrickColor.new("Bright red") wait(2) end Part1.Touched:connect(onTouch)
Part's take BrickColor, not Color3.
† KMXD † |
|
|
| Report Abuse |
|
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
| |
|
Yousef128
|
  |
| Joined: 24 Sep 2009 |
| Total Posts: 6854 |
|
| |
|
|
| 24 Jul 2012 06:04 PM |
Try to figure out what this does :P
function onhit(hit) script.Parent.CFrame = CFrame.new(5,2,5) end script.Parent.Touched:connect(onhit) |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2012 06:05 PM |
To make mine harder:
script.Parent:connect(function(hit) script.Parent.CFrame = CFrame.new(5,2,5) end) |
|
|
| Report Abuse |
|
|