generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

I think I got this script down!

Previous Thread :: Next Thread 
Virtuex is not online. 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 is not online. 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 is not online. 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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
22 Jul 2011 10:19 PM
"m:remove() then do" --wtf?
Also, the line after that doesn't seem right either...
Report Abuse
Biostream is not online. 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 is not online. 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 is not online. Biostream
Joined: 28 Mar 2011
Total Posts: 913
22 Jul 2011 10:21 PM
Just you. Promise.
Report Abuse
Virtuex is not online. 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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
22 Jul 2011 10:23 PM
Since when RBLX.Lua has versions? ._.
Report Abuse
Biostream is not online. Biostream
Joined: 28 Mar 2011
Total Posts: 913
22 Jul 2011 10:24 PM
Sounds great. Read it.
Report Abuse
scepile3 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image