Virtuex
|
  |
| Joined: 23 Mar 2011 |
| Total Posts: 4056 |
|
|
| 22 Jul 2011 10:15 PM |
It goes into a brick, and it makes a message pop up while killing you.
function onTouched(brick) for i = 10, 1 -1 do print("coolio") m = game.Workspace.Instance.new("Message") m.Text = "You will die for touching this brick." wait(10) m:Remove() then do game.Workspace.Humanoid.Health = 0 end end
mouse1:Button1down.onT:connect |
|
|
| Report Abuse |
|
|
Virtuex
|
  |
| Joined: 23 Mar 2011 |
| Total Posts: 4056 |
|
|
| 22 Jul 2011 10:18 PM |
| Im guessing lines 7, 8, and 12 are wrong :/ |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 22 Jul 2011 10:19 PM |
script.Parent.Touched:connect(function(h) print("coolio") m = Instance.new("Message", game.Workspace) m.Text = "You will die for touching this brick." wait(3) m:Remove() h.Parent.Humanoid.Health = 0 end) |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2011 10:19 PM |
"m:remove() then do" --wtf? Also, the line after that doesn't seem right either... |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 22 Jul 2011 10:20 PM |
| Just about everything was wrong. Try to keep on the basics for now; do the absolute beginners guide to scripting. This is a little complicated for someone of your scripting capacity. No offense. |
|
|
| Report Abuse |
|
|
Virtuex
|
  |
| Joined: 23 Mar 2011 |
| Total Posts: 4056 |
|
|
| 22 Jul 2011 10:21 PM |
| @Bio, is it just me, or is ROBLOX Lua changing? :/ |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
| |
|
Virtuex
|
  |
| Joined: 23 Mar 2011 |
| Total Posts: 4056 |
|
|
| 22 Jul 2011 10:22 PM |
| @Bio, the wiki is ROBLOX Lua 1.0, which is useless now. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2011 10:23 PM |
| Since when RBLX.Lua has versions? ._. |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
| |
|
scepile3
|
  |
| Joined: 27 Feb 2009 |
| Total Posts: 260 |
|
|
| 23 Jul 2011 01:06 AM |
Well, the problems were lines 7, 8, and 12. XD
[m:Remove() then do] Well, this isn't really a conditional statement. m:Remove() would work if there is an m. (being too lazy to check) [game.Workspace.Humanoid.Health = 0] You're missing the player, which you could find by various ways... Here you basically try to skip finding the person before killing 'em. XD [mouse1:Button1down.onT:connect] This doesn't "connect" the event to a function. A ([function name]) at the end of that line would fix it. |
|
|
| Report Abuse |
|
|