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 » Scripters
Home Search
 

Any ideas why my arms aren't moving sometimes?

Previous Thread :: Next Thread 
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
14 Aug 2015 01:50 PM
The output is the same and printing the Weld.C1 shows it should be moving but sometimes it just doesn't

Scenario 1:
Doesn't move at all

Scenario 2:
Works correctly but then doesn't move after a few times (and when it stops working is random but it's always at the start or at the end of the cframe loop, don't know which)

I would step through the code but that takes long af
Is there an easier way to debug this?
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
14 Aug 2015 02:16 PM
tell us briefly then, what scripts u got and what they do...

"My Life is going Good... but..."
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
14 Aug 2015 02:35 PM
"I would step through the code but that takes long af"

You either do, see whats wrong and fix it, or don't and keep your problem alive. Choose one.


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
AdamHighDefinition is not online. AdamHighDefinition
Joined: 09 Aug 2015
Total Posts: 628
14 Aug 2015 02:41 PM
I would offer to buy you a bϵϵr, but frankly, I've seen your code.

I think you've had enough.

64 Mbps, FTTC.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
14 Aug 2015 02:44 PM
^ jealous noob still stalking me and the only code of mine u couldve seen is my flamethrower which is good

i was just asking if anyone might have experienced something like this before and knows a potential problem
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
14 Aug 2015 02:47 PM
solution*
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Oct 2015 06:42 PM
Okay so I'm pretty sure I found the problem... but I don't know why it happens


local character = game.Players.LocalPlayer.Character
local Part0 = character["Right Arm"]
local Part1 = character["Torso"]
local cframe = Part1.CFrame:toObjectSpace(Part0.CFrame)

local w = Instance.new("Weld", Part1)
w.Part0 = Part0
w.Part1 = Part1
w.C1 = cframe

print(cframe)

==========
== OUTPUT
==========

cframe value when it works:

1.49996948, 0.400024414, -0.599975586, 0.999999106, 4.65661287e-010, -4.57457219e-014, 4.57457219e-014, -4.97379915e-014, -1, -4.65661287e-010, 0.999999106, 4.97379949e-014

1.49996948, 0.400024414, -0.599975586, 0.999999106, 4.65661287e-010, -4.57457219e-014, 4.57457219e-014, -4.97379915e-014, -1, -4.65661287e-010, 0.999999106, 4.97379949e-014

1.49996948, 0.400024414, -0.599975586, 0.999999106, 4.65661287e-010, -4.57457219e-014, 4.57457219e-014, -4.97379915e-014, -1, -4.65661287e-010, 0.999999106, 4.97379949e-014

1.49996948, 0.400024414, -0.599975586, 0.999999106, 4.65661287e-010, -4.57457219e-014, 4.57457219e-014, -4.97379915e-014, -1, -4.65661287e-010, 0.999999106, 4.97379949e-014


When it doesn't work:

1.5, 0.399963379, -0.600036621, 0.999999166, 2.98023224e-008, 0, 2.32830644e-010, -9.31322575e-010, -1.00000024, -2.98023224e-008, 0.999998927, 0

1.5, 0.399963379, -0.600036621, 0.999999166, 2.98023224e-008, 0, 2.32830644e-010, -9.31322575e-010, -1.00000024, -2.98023224e-008, 0.999998927, 0

1.5, 0.399963379, -0.599914551, 0.999999166, 2.98023224e-008, 0, 2.32830644e-010, -9.31322575e-010, -1.00000024, -2.98023224e-008, 0.999998927, 0

1.49987793, 0.399963379, -0.599975586, 0.999999166, 2.98023224e-008, 0, 2.32830644e-010, -9.31322575e-010, -1.00000024, -2.98023224e-008, 0.999998927, 0


Scenarios I've noticed:
Always works
Never works
Works 1 or more times but then doesn't ever work after that (wat)


Any guesses? :(

P.S. Time you're a noob. I don't think you know how long it takes to step through many lines of code. It didn't help me find how my humanoid was dying nor would it likely help with this problem
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Oct 2015 06:48 PM
Just stepped through the code and the same stuff happened when it worked twice and when it didn't work
Well there goes some of my life I'll never get back
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
23 Oct 2015 06:55 PM
The part about "Works once, but doesn't work after" is cos ur using WaitForChild() in a LocalScript that is resetted when u die, if so, drop WaitForChild...

"My Life is going Good... but..."
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Oct 2015 06:57 PM
Like this

function a()
-- the weld code i just posted
end

a()
--works

a()
--works

a()
-- doesnt work
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
23 Oct 2015 07:37 PM
well... dunno, u should have gotten an error then :/

"My Life is going Good... but..."
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
23 Oct 2015 07:39 PM
Add a wait time before each animation.
And check for any nil entries.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Oct 2015 08:00 PM
The problem is with this code

local character = game.Players.LocalPlayer.Character
local Part0 = character["Right Arm"]
local Part1 = character["Torso"]

-- More specifically, it's this line
local cframe = Part1.CFrame:toObjectSpace(Part0.CFrame)

local w = Instance.new("Weld", Part1)
w.Part0 = Part0
w.Part1 = Part1
w.C1 = cframe
Report Abuse
HexC3D is not online. HexC3D
Joined: 30 Jun 2012
Total Posts: 10044
23 Oct 2015 08:10 PM
repeat wait() until player.character ~= nil -- define player
character:WaitForChild("Right Arm")
character:WaitForChild("Torso")
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
24 Oct 2015 12:16 AM
Everything is fully loaded
Sometimes it returns a different CFrame which I believe is why it doesn't work
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
24 Oct 2015 12:22 AM
"u couldve seen is my flamethrower which is good"
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
24 Oct 2015 12:39 AM
XD
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
24 Oct 2015 05:58 AM
Found the problem!

Basically, I had welds that had part0 as the limb and then other welds that had part1 as the limb
When the other welds didn't exist, the animations always worked correctly

Time to go remake all of my animations :')
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
24 Oct 2015 05:59 AM
>mfw it was roblox all along >:(
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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