62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 01:22 PM |
In studio this works great. In servers when I unequip this tool the arms fall through the ground. It doesn't put them back to their original positions, as studio did. ;c
script.Parent.Equipped:connect(function() equipped = true if not c["Right Arm"]:FindFirstChild("WeaponWeld") then local newWeld = Instance.new("Weld",c["Right Arm"]) newWeld.Part0 = c["Right Arm"] newWeld.Part1 = c.Torso newWeld.Name = "WeaponWeld" newWeld.C1 = (newWeld.C1 * CFrame.Angles(math.rad(92),0,math.rad(-10))) + Vector3.new(1.2,.4,-.5) local newWeld2 = Instance.new("Weld",c["Left Arm"]) newWeld2.Part0 = c["Left Arm"] newWeld2.Name="WeaponWeld" newWeld2.Part1 = c.Torso newWeld2.C1 = (newWeld2.C1 * CFrame.Angles(math.rad(92),0,math.rad(50))) + Vector3.new(-.3,.4,-.8) end end)
script.Parent.Unequipped:connect(function() equipped = false pcall(function() c["Left Arm"].WeaponWeld:Destroy() c["Right Arm"].WeaponWeld:Destroy() end) end)
|
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 01:26 PM |
| COME ON! 1 view? This is ridiculous. I am SO frustrated. Roblox is failing on me. |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 01:38 PM |
Bump. Why does it work in studio and not servers?
In servers the arms fall off into the void when you unequip.
Please help, this is taking SO MUCH TIME!
The forums are just dead today. |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 01:42 PM |
Well maybe I should provide more details.
Not sure if this matters, but it's a LocalScript inside a Tool.
In studio, if you unequip the tool, the arms go back to their usual places. But in servers, when you unequip, the arms fall through the ground. The rest of the script works great, no output. I hope these details cover more than before. |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 01:48 PM |
| I've never seen this forum so dead before. |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
| |
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
| |
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 02:10 PM |
| Earth to the Scripters forum. Do you read me? |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2016 02:12 PM |
You need to save the original Motor6D default joints, because by creating a new joint it'll break the old one. A very common technique was to re-parent the old Motor6Ds to nil, save a reference to it, then parent it back to the Torso when they unequip it
Recommended username: CynicalRay_revenge
|
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 02:19 PM |
Oh yes! My first reply! Thank you :D
So is this what I should do:
-Create a table of all the motors when the unequip function is triggered -Remove gun welds -Remove old motors -Clone new motors from table
Or maybe in different order if it matters. |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2016 02:22 PM |
- player equips gun - set the two shoulder joints' parents to nil, and save a reference to it - create the welds - player unequips - destroy welds - put the joints back
Recommended username: EarthyRay_revenge
|
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 14 Mar 2016 02:26 PM |
-Collapses from exhaustion-
Thanks buddy, this took me hours. Had no idea why it worked in studio and not server, and I don't have much experience with that motor stuff. |
|
|
| Report Abuse |
|
|