025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 07 Dec 2014 02:35 PM |
while true do for i = 120,1,-1 do local m = Instance.new("Message") m.Parent = game.Workspace m.Text = i end
R$7,070 |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2014 02:36 PM |
Actually - Wrong forum.
-Love, Everyone. |
|
|
| Report Abuse |
|
|
ericjr8
|
  |
| Joined: 02 Jan 2010 |
| Total Posts: 8040 |
|
| |
|
Everment
|
  |
| Joined: 08 Oct 2009 |
| Total Posts: 6020 |
|
|
| 07 Dec 2014 02:36 PM |
- Missing an end - You never remove the messages so you'll end up getting a "120" then "119" over that, then "118" over those, etc. - You don't have a wait, therefore it all happens "instantly" |
|
|
| Report Abuse |
|
|
| |
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 07 Dec 2014 02:39 PM |
Oops, I had the second 'end' in the script but forgot to paste it
while true do for i = 120,1,-1 do local m = Instance.new("Message") m.Parent = game.Workspace m.Text = i wait(1) m.Destroy() end end
R$7,070 |
|
|
| Report Abuse |
|
|
Everment
|
  |
| Joined: 08 Oct 2009 |
| Total Posts: 6020 |
|
|
| 07 Dec 2014 02:40 PM |
Destroy is a method, needs to be called with a `:` instead of a `.`
And you want this to continuously count from 120 to 1 then start again? |
|
|
| Report Abuse |
|
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 07 Dec 2014 02:42 PM |
I knew that, wow I'm an idiot
yes because it's a map changer
R$7,070 |
|
|
| Report Abuse |
|
|
Salinas23
|
  |
| Joined: 28 Dec 2008 |
| Total Posts: 37142 |
|
|
| 07 Dec 2014 02:43 PM |
You will end up with 120 mess ages after the time runs out
if you want to show a hint countdown, do this
h = Instance.new("Hint", workspace)
for i = 120, 1, -1 do h.Text = i wait(1) end
h:Destroy()
R$62,405 |
|
|
| Report Abuse |
|
|
amusings
|
  |
| Joined: 11 Nov 2008 |
| Total Posts: 13936 |
|
|
| 07 Dec 2014 02:44 PM |
| wats lua!!!!!!!!!!!!!!!!!!!! omg!!!!!!!!!!!!! |
|
|
| Report Abuse |
|
|
WebGL3D
|
  |
| Joined: 04 Sep 2013 |
| Total Posts: 28311 |
|
|
| 07 Dec 2014 02:45 PM |
@cwat actually if he gives it a parameter of itself it will work just as well
Workspace.Part.Destroy(Workspace.Part) has the same affect as Workspace.Part:Destroy()
When calling a method in Lua it's like calling a function with the first argument being itself
~ 1Topcop ~ WebGL3D ~ Java3D ~ Data3D ~ Purple Squid > |
|
|
| Report Abuse |
|
|
Everment
|
  |
| Joined: 08 Oct 2009 |
| Total Posts: 6020 |
|
|
| 07 Dec 2014 03:39 PM |
| @Web I know, but how often do you see/do/use that? |
|
|
| Report Abuse |
|
|
WebGL3D
|
  |
| Joined: 04 Sep 2013 |
| Total Posts: 28311 |
|
|
| 07 Dec 2014 04:18 PM |
@cwat when I made things like RoQuery ;p
RQ(Workspace.Part,Workspace.Part2).meth("clear") -- calls the ClearAllChildren method of Workspace.Part, and Workspace.Part2
~ 1Topcop ~ WebGL3D ~ Java3D ~ Data3D ~ Purple Squid > |
|
|
| Report Abuse |
|
|
Everment
|
  |
| Joined: 08 Oct 2009 |
| Total Posts: 6020 |
|
|
| 07 Dec 2014 04:21 PM |
function RQ(...) return { meth = function(x) if x == "clear" then for _, obj in pairs({...}) do obj:ClearAllChildren() end end end} end
RQ(game.Workspace.Part, game.Workspace.Part2, game.Workspace.Part3).meth("clear")
I don't see a need for calling a method as a function |
|
|
| Report Abuse |
|
|
WebGL3D
|
  |
| Joined: 04 Sep 2013 |
| Total Posts: 28311 |
|
|
| 07 Dec 2014 04:35 PM |
.method is autoCorrected, it can handle any method and auto-corrects all the arguments clear was just an example
RQ("staRtergU").meth("setcoregui","player","false") -- auto-corrects "player" to "PlayerList", and "false" to false
~ 1Topcop ~ WebGL3D ~ Java3D ~ Data3D ~ Purple Squid > |
|
|
| Report Abuse |
|
|
| |
|
ericjr8
|
  |
| Joined: 02 Jan 2010 |
| Total Posts: 8040 |
|
| |
|