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: Breathe

Previous Thread :: Next Thread 
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
26 May 2013 09:54 PM
Here's my breathing animation that will run when you equip the gun. It won't work. Please help.

Script:
function Test()
wait ()
PT = welds[1].C0
PTA = welds[2].C0
PTB = welds[3].C0
PTC = welds[4].C0
for i = 1, 2 do
repeat
PT = CFrame + Vector3.new(0, -0.004, 0)
PTA = CFrame + Vector3.new(0, -0.004, 0)
PTB = CFrame + Vector3.new(0, -0.004, 0)
PTC = CFrame + Vector3.new(0, -0.004, 0)
wait(0.2)
PT = CFrame + Vector3.new(0, -0.004, 0)
PTA = CFrame + Vector3.new(0, -0.004, 0)
PTB = CFrame + Vector3.new(0, -0.004, 0)
PTC = CFrame + Vector3.new(0, -0.004, 0)
wait(0.2)
PT = CFrame + Vector3.new(0, -0.004, 0)
PTA = CFrame + Vector3.new(0, -0.004, 0)
PTB = CFrame + Vector3.new(0, -0.004, 0)
PTC = CFrame + Vector3.new(0, -0.004, 0)
wait (0.2)
PT = CFrame + Vector3.new(0, -0.004, 0)
PTA = CFrame + Vector3.new(0, -0.004, 0)
PTB = CFrame + Vector3.new(0, -0.004, 0)
PTC = CFrame + Vector3.new(0, -0.004, 0)
wait (0.2)
PT = CFrame + Vector3.new(0, -0.004, 0)
PTA = CFrame + Vector3.new(0, -0.004, 0)
PTB = CFrame + Vector3.new(0, -0.004, 0)
PTC = CFrame + Vector3.new(0, -0.004, 0)
wait (0.2)
PT = CFrame + Vector3.new(0, 0.004, 0)
PTA = CFrame + Vector3.new(0, 0.004, 0)
PTB = CFrame + Vector3.new(0, 0.004, 0)
PTC = CFrame + Vector3.new(0, 0.004, 0)
wait (0.2)
PT = CFrame + Vector3.new(0, 0.004, 0)
PTA = CFrame + Vector3.new(0, 0.004, 0)
PTB = CFrame + Vector3.new(0, 0.004, 0)
PTC = CFrame + Vector3.new(0, 0.004, 0)
wait (0.2)
PT = CFrame + Vector3.new(0, 0.004, 0)
PTA = CFrame + Vector3.new(0, 0.004, 0)
PTB = CFrame + Vector3.new(0, 0.004, 0)
PTC = CFrame + Vector3.new(0, 0.004, 0)
wait (0.2)
PT = CFrame + Vector3.new(0, 0.004, 0)
PTA = CFrame + Vector3.new(0, 0.004, 0)
PTB = CFrame + Vector3.new(0, 0.004, 0)
PTC = CFrame + Vector3.new(0, 0.004, 0)
wait (0.2)
PT = CFrame + Vector3.new(0, 0.004, 0)
PTA = CFrame + Vector3.new(0, 0.004, 0)
PTB = CFrame + Vector3.new(0, 0.004, 0)
PTC = CFrame + Vector3.new(0, 0.004, 0)
wait (0.2)
until i == 3
end
end


Here's the output:
19:49:48.332 - Players.WantSomeNinja.Backpack.FN.Main:112: bad argument #1 to '?' (Vector3 expected, got table)
19:49:48.333 - Script "Players.WantSomeNinja.Backpack.FN.Main", Line 112
19:49:48.333 - stack end
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
26 May 2013 11:09 PM
Well, considering how there's only 59 lines overall, I don't see how there could be an error at line 112.

MUST. RUIN. CHILDHOOD.
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
27 May 2013 11:13 AM
This is a part in the script. Line 112 is the line under the "repeat".
Report Abuse
Frostglacier is not online. Frostglacier
Joined: 28 Oct 2010
Total Posts: 4177
27 May 2013 11:14 AM
Why not post line 112 if the error is there?
Report Abuse
Frostglacier is not online. Frostglacier
Joined: 28 Oct 2010
Total Posts: 4177
27 May 2013 11:15 AM
Ah, my bad. I didn't realize that this was the lower portion of the script.
Report Abuse
Frostglacier is not online. Frostglacier
Joined: 28 Oct 2010
Total Posts: 4177
27 May 2013 11:16 AM
Alright, I think this may fix it:

PT = PT.CFrame + Vector3.new(0, -0.004, 0)
PTA = PTA.CFrame + Vector3.new(0, -0.004, 0)
PTB = PTB.CFrame + Vector3.new(0, -0.004, 0)
PTC = PTC.CFrame + Vector3.new(0, -0.004, 0)

Vector3.new may or may not have to be changed to CFrame.new.
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
27 May 2013 11:39 AM
Alright. So I put it there, but this is what I got:


Output:

09:38:24.352 - CFrame is not a valid member
09:38:24.352 - Script "Players.WantSomeNinja.Backpack.FN.Main", Line 112
09:38:24.353 - stack end
Report Abuse
ilikepiehaha is not online. ilikepiehaha
Joined: 02 Aug 2011
Total Posts: 316
27 May 2013 11:42 AM
PT.CFrame = CFrame * CFrame.new(#, #, #)

??

Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
27 May 2013 11:45 AM
Now I got this:

09:44:20.291 - Players.WantSomeNinja.Backpack.FN.Main:112: bad argument #1 to '?' (CFrame expected, got table)
09:44:20.292 - Script "Players.WantSomeNinja.Backpack.FN.Main", Line 112
09:44:20.292 - stack end


PT = welds[1].C0
PTA = welds[2].C0
PTB = welds[3].C0
PTC = welds[4].C0
Report Abuse
Voidion is not online. Voidion
Joined: 01 Aug 2011
Total Posts: 2668
27 May 2013 11:48 AM
...

PT.CFrame = PT.CFrame * CFrame.new(0, 0, 0)
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
27 May 2013 11:52 AM
Same problem.

This one seems to work:
PT = CFrame.new(-0.5, 5, 1)

Because after I put this and replaced line 112, the error is now at 113. The problem is, no matter how much I change the value, why isn't there any noticeable position change in my arm?
Report Abuse
hempants15 is not online. hempants15
Joined: 22 Jul 2011
Total Posts: 153
21 Sep 2014 06:58 PM
All your Cframes are like this Pt = Cframe(Blah balh baljh)
they need to be like this Pt = Pt.Cframe(Blah balh baljh)
Yours Isn't defining What CFrame. so you say X = X.Cframe
I dont know what exactly Pt and ptc is tho
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
22 Sep 2014 12:33 AM
Omg. This is so old, I remember this. I've improved so much. LOL
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
22 Sep 2014 01:20 AM
I was about to help on this then I saw 2013 and looked at the bottom.

1) Good for u

2) Pls don't bump year+ old threads.
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