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
 

Re: I don't get why this will not work

Previous Thread :: Next Thread 
Guest93640 is not online. Guest93640
Joined: 24 Jul 2011
Total Posts: 1360
28 Jul 2014 05:12 PM
It's supposed to be a command script. When you type "reset" into the chat it is supposed to kill you, but for some reason it doesn't work.

function processCommand(speaker, message)
-- if someone chatted "reset"
if message == "reset" then
-- Destroy the player's head
(speaker.Head:Destroy())
end
end
Report Abuse
Guest93640 is not online. Guest93640
Joined: 24 Jul 2011
Total Posts: 1360
28 Jul 2014 05:14 PM
All it tells me is that there is a syntax error near "end"
Report Abuse
Guest93640 is not online. Guest93640
Joined: 24 Jul 2011
Total Posts: 1360
28 Jul 2014 05:19 PM
bump
Report Abuse
BLOXLUA is not online. BLOXLUA
Joined: 16 Mar 2013
Total Posts: 453
28 Jul 2014 05:20 PM
I don't think you can put "()" around that.
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
28 Jul 2014 05:21 PM
Erm yeah, change this line:
(speaker.Head:Destroy())
to this:
speaker.Head:Destroy()
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
28 Jul 2014 05:21 PM
dem useless brackets doe
Report Abuse
vm9 is not online. vm9
Joined: 29 Nov 2007
Total Posts: 347
28 Jul 2014 05:27 PM
Put a bracket at the end of the second end (the one at the bottom).
Report Abuse
BLOXLUA is not online. BLOXLUA
Joined: 16 Mar 2013
Total Posts: 453
28 Jul 2014 05:27 PM
vm, no.
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
28 Jul 2014 05:28 PM
GENIUS PGED
Report Abuse
vm9 is not online. vm9
Joined: 29 Nov 2007
Total Posts: 347
28 Jul 2014 05:29 PM
Sorry I am just starting out with Lua and thought I could help ;_;
Report Abuse
BLOXLUA is not online. BLOXLUA
Joined: 16 Mar 2013
Total Posts: 453
28 Jul 2014 05:30 PM
It's okay. Don't cry child, shhhhhh.
Report Abuse
Guest93640 is not online. Guest93640
Joined: 24 Jul 2011
Total Posts: 1360
28 Jul 2014 06:23 PM
STill doesn't work :| When I tested the game and typed "reset" nothing happened.
Report Abuse
Frostglacier is not online. Frostglacier
Joined: 28 Oct 2010
Total Posts: 4177
28 Jul 2014 06:32 PM
speaker.Character.Head?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
28 Jul 2014 06:40 PM
Game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(input)
if input:lower == "reset" and player.Character and player.Character.Parent == Workspace then
player.Character:BreakJoints()
end
end)
end)
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