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
 

Re: Script can't find Player Joints after death

Previous Thread :: Next Thread 
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 10:17 AM
local Joints = {
Neck = bodyParts.Torso:WaitForChild("Neck"),
RightShoulder = bodyParts.Torso:WaitForChild("Right Shoulder"),
LeftShoulder = bodyParts.Torso:WaitForChild("Left Shoulder"),
RightHip = bodyParts.Torso:WaitForChild("Right Hip"),
LeftHip = bodyParts.Torso:WaitForChild("Left Hip")
}

it waits forever, and I made sure that they are there after the player dies. whats the problem? Thank you.

Just be grateful.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
07 Nov 2015 10:23 AM
Apparently, you did not make sure that they are there after the player dies.
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
07 Nov 2015 10:24 AM
player.CharacterAdded:connect(function(char)
local Joints = {
Neck = char.Torso:WaitForChild("Neck"),
RightShoulder = char.Torso:WaitForChild("Right Shoulder"),
LeftShoulder = char.Torso:WaitForChild("Left Shoulder"),
RightHip = char.Torso:WaitForChild("Right Hip"),
LeftHip = char.Torso:WaitForChild("Left Hip")
}

end)

define the table each time the character loads
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 10:32 AM
it's in a local script, and yes, using the ingame console, I checked all of torso's children and all the joints were there. These variables are using "WaitForChild".

Just be grateful.
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 10:34 AM
Anyway I also tried this: It repeats forever

repeat
Joints = {
Neck = bodyParts.Torso:FindFirstChild("Neck"),
RightShoulder = bodyParts.Torso:FindFirstChild("Right Shoulder"),
LeftShoulder = bodyParts.Torso:FindFirstChild("Left Shoulder"),
RightHip = bodyParts.Torso:FindFirstChild("Right Hip"),
LeftHip = bodyParts.Torso:FindFirstChild("Left Hip")
}
wait(.1)
until Joints.LeftHip

Just be grateful.
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 03:02 PM
Any ideas?

Just be grateful.
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
07 Nov 2015 03:13 PM
why not just define them every time the character respawns..? if it is in a local script it won't matter:

local plr = game.Players.LocalPlayer
local Joints = {}

plr.CharacterAdded:connect(function(char)
local bodyParts = char:GetChildren()
Joints.Neck = bodyParts.Torso:WaitForChild("Neck")
Joints.RightShoulder = bodyParts.Torso:WaitForChild("Right Shoulder")
Joints.LeftShoulder = bodyParts.Torso:WaitForChild("Left Shoulder")
Joints.LeftHip = bodyParts.Torso:WaitForChild("Left Hip")
Joints.RightHip = bodyParts.Torso:WaitForChild("Left Hip")
end)
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
07 Nov 2015 03:14 PM
Joints dissapear after death, don't they?
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 03:51 PM
It is in a local script :/

Just be grateful.
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 04:48 PM
Come on on someone help plz.

Just be grateful.
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 05:26 PM
works in solo mode, forgot to say that.

Just be grateful.
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
07 Nov 2015 05:40 PM
Bump

Just be grateful.
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
08 Nov 2015 07:17 AM
Bump

Just be grateful.
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