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: Help please!

Previous Thread :: Next Thread 
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 09:29 AM
I am a beginner scripter, and I just tried to make a script. It does not seem to work, as I get the error "Function arguments expected near print".
Here is my script.

print 'Test starting...'
wait(1)
game.Workspace.jason03272002.Torso.Neck:Destroy
print 'Test finished.'
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
26 May 2012 09:31 AM
I hate that new way to print stuff. Try this, it's the old print.

print("Test starting...")
wait(1)
game.Workspace.jason03272002.Torso.Neck:Destroy
print("Test finished.")

MrMcAero
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 09:33 AM
Ok. I'll try it. Thank you!
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 09:36 AM
It did not work. Back to the drawing board...
My script:

print 'Test starting...'
wait(1)
game.Workspace.jason03272002.Torso.Neck:Destroy
print 'Test finished.'
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
26 May 2012 09:38 AM
Are you trying to kill the player? If so, use this:

print("Test starting...")
wait(1)
game.Workspace.jason03272002:BreakJoints()
print("Test finished.")

MrMcAero
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
26 May 2012 09:38 AM
LOL WHOOPS!

Here, Destroy is a method, you gotta have the ()'s.

print'Test starting...'
wait(1)
game.Workspace.jason03272002.Torso.Neck:Destroy()
print'Test finished.'

MrMcAero
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 09:42 AM
Still, The print is where it is having the problem. Thanks for thw fix at :Destroy, though!
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 10:50 AM
I dont need anymore help. I fixed my script then i updated it.
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
26 May 2012 10:51 AM
By the way, there's no part called "Neck" in the torso.
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 11:04 AM
Yes there is. Well, for my person there is. Maybe it cuz i have superhero package.
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
26 May 2012 12:18 PM
@BAUER102

Neck is not a part. It's a MotorFeature I think, or a Hole (Blue square thing)

MrMcAero
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 12:20 PM
Neck is a part on my person. I located it in Torso. Script form:
game.Workspace.jason03272002.Torso.Neck
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
26 May 2012 12:24 PM
@Jason

I was explaining to BAUER that Neck is so a part of the Torso, but is not a Brick.

MrMcAero
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
26 May 2012 12:29 PM
MMA is right, you can't kill the player by destroying the neck.

Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
26 May 2012 12:34 PM
Ya you can. It kills my player.
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
15 Jun 2012 09:55 PM
I need help again, you great scripters out there. I can't figure out why my door script doesn't work. And, if you can, explain the "onTouch" function to me. The wiki page for onTouch is too complicated. Anyways, here is my script.

wait(30)
if workspace.jason03272002 true then workspace.CreatorDoor:Transparency=1
if workspace.jason03272002 true then workspace.CreatorCoor:CanCollide=false
if workspace.jason03272002 nil then end

P.S. workspace does not need game. in front of it, as since game isn't something actually found in the main source(I think). Workspace alone is a main area.
Report Abuse
jason03272002 is not online. jason03272002
Joined: 24 Dec 2010
Total Posts: 86
17 Jun 2012 08:54 AM
My onTouch script is very inefficent and it dosen't even work! I don't get why, because I wrote down the function and the rest of the code on paper from my ontouch door script, but I get this error when it tries to call the function. 09:47:33 - attempt to call a nil value
09:47:33 - Disconnected event because of exception

Here is the script.


function OnTouch()
part.Position.X = 31.5
part.Position.X = 31
part.Position.X = 30.5
part.Position.X = 30
part.Position.X = 29.5
part.Position.X = 29
part.Position.X = 28.5
part.Position.X = 28
part.Position.X = 27.5
part.Position.X = 27
part.Position.X = 26.5
part.Position.X = 26
part.Position.X = 25.5
part.Position.X = 25
part.Position.X = 24.5
part.Position.X = 24
part.Position.X = 23.5
part.Position.X = 23
part.Position.X = 22.5
part.Position.X = 22
part.Position.X = 21.5
part.Position.X = 21
wait(5)
part.Position.X = 31
end
part = game.Workspace.Part
part.Touched:connect(onTouch)

Please try to fix. Thank you!

P.S. The post above is my second door script, not my first.
Report Abuse
HatModder is not online. HatModder
Joined: 05 Jun 2012
Total Posts: 12891
17 Jun 2012 08:58 AM
Try this.

function OnTouch()
part.Position.X = 31.5
(wait 0.5)
part.Position.X = 31
(wait 0.5)
part.Position.X = 30.5
(wait 0.5)
part.Position.X = 30
(wait 0.5)
part.Position.X = 29.5
(wait 0.5)
part.Position.X = 29
(wait 0.5)
part.Position.X = 28.5
(wait 0.5)
part.Position.X = 28
(wait 0.5)
part.Position.X = 27.5
(wait 0.5)
part.Position.X = 27
(wait 0.5)
part.Position.X = 26.5
(wait 0.5)
part.Position.X = 26
(wait 0.5)
part.Position.X = 25.5
(wait 0.5)
part.Position.X = 25
(wait 0.5)
part.Position.X = 24.5
(wait 0.5)
part.Position.X = 24
(wait 0.5)
part.Position.X = 23.5
(wait 0.5)
part.Position.X = 23
(wait 0.5)
part.Position.X = 22.5
(wait 0.5)
part.Position.X = 22
(wait 0.5)
part.Position.X = 21.5
(wait 0.5)
part.Position.X = 21
wait(0.5)
part.Position.X = 31
(wait 0.5)
end
part = game.Workspace.Part
part.Touched:connect(onTouch)
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
17 Jun 2012 09:22 AM
About your original script..

You forgot to close the function..hehe....

It's "Destroy()" not "Destroy"
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