|
| 01 Mar 2012 05:26 PM |
I have just started to learn how to script and im learning how to make loops on the LuaLearners site and this script does not seem to work:
Door = Game.Workspace.Door
while true do Wait (15) Door.Transparency = 1 Door.CanCollide false Wait (30) Door.Transparency = 0 Door.Cancollide true
end
Can you fix it? |
|
|
| Report Abuse |
|
|
ServerHax
|
  |
| Joined: 29 Feb 2012 |
| Total Posts: 16 |
|
|
| 01 Mar 2012 05:27 PM |
| NEVER capitalize game in a script.... Always do it like this... game.Workspace or any other service in game. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2012 05:27 PM |
CanCollide is a property, like the Transparency. You need to set it.
Door = Game.Workspace.Door
while true do Wait (15) Door.Transparency = 1 Door.CanCollide = false Wait (30) Door.Transparency = 0 Door.CanCollide = true
end |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
| |
|
ServerHax
|
  |
| Joined: 29 Feb 2012 |
| Total Posts: 16 |
|
|
| 01 Mar 2012 05:31 PM |
@oxcool1
--Last I checked that didn't work unless of updates thread.oxcool1.Ideas.Value = "Intermittent" |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
| |
|
|
| 01 Mar 2012 05:37 PM |
I've heard it can be used, but does that make "game" deprecated?
† KMXD † |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 01 Mar 2012 05:43 PM |
@knight Possibly, the Admins like PascalCase.
However they can never remove the game variable - since that would break nearly every script on Roblox. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2012 05:49 PM |
| Thank you for helping me :) |
|
|
| Report Abuse |
|
|
| |
|