|
| 12 May 2013 02:50 PM |
local Welds = {}
local player local character
script.Parent.Equipped:connect(function(mouse) player = game.Players.LocalPlayer character = player.Character local center = script.Parent.Head.CFrame local newcenter = character.Head.CFrame ------------------------------------------- local head = script.Parent.Head local hd = character.Head local cx = hd.CFrame local headw = Instance.new("ManualWeld", hd) table.insert(Welds, headw) headw.C0, headw.C1, headw.Part0, headw.Part1 = hd.CFrame:inverse()*cx, head.CFrame:inverse()*cx, hd, head ------------------------------------------- for i, v in pairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then v.CFrame = newcenter*(center:inverse()*v.CFrame) end end local motor1 = character.Torso["Left Shoulder"]:Clone() local motor2 = character.Torso["Right Shoulder"]:Clone() character.Torso["Left Shoulder"]:Destroy() character.Torso["Right Shoulder"]:Destroy() for i = 1, 2 do local side if i == 1 then side = "Left" else side = "Right" end local v = character[side.." Arm"] local h = script.Parent["Fake"..side.."Arm"] local cx = h.CFrame local w = Instance.new("ManualWeld", h) table.insert(Welds, w) w.C0, w.C1, w.Part0, w.Part1 = h.CFrame:inverse()*cx, v.CFrame:inverse()*cx, h, v v.CFrame = h.CFrame end end)
In the output, it says the following:
15:49:40.446 - maximum event re-entrancy depth exceeded 15:49:40.452 - maximum event re-entrancy depth exceeded 15:49:40.453 - Left Shoulder is not a valid member of Part 15:49:40.453 - Script "Workspace.Gun.WeldAnim", Line 24 15:49:40.454 - stack end 15:49:40.454 - Disconnected event because of exception 15:49:40.476 - maximum event re-entrancy depth exceeded
I don't get it at all. Please explain this. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 12 May 2013 03:51 PM |
Aaaaaaand again.
16:46:58.969 - Left Shoulder is not a valid member of Part 16:46:58.970 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.971 - stack end 16:46:58.972 - Left Shoulder is not a valid member of Part 16:46:58.973 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.974 - stack end 16:46:58.974 - Left Shoulder is not a valid member of Part 16:46:58.975 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.976 - stack end 16:46:58.977 - Left Shoulder is not a valid member of Part 16:46:58.977 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.978 - stack end 16:46:58.979 - Left Shoulder is not a valid member of Part 16:46:58.980 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.981 - stack end 16:46:58.981 - Left Shoulder is not a valid member of Part 16:46:58.982 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.983 - stack end 16:46:58.984 - Left Shoulder is not a valid member of Part 16:46:58.984 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.985 - stack end 16:46:58.986 - Left Shoulder is not a valid member of Part 16:46:58.987 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.987 - stack end 16:46:58.988 - Left Shoulder is not a valid member of Part 16:46:58.989 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.990 - stack end 16:46:58.991 - Left Shoulder is not a valid member of Part 16:46:58.992 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.992 - stack end 16:46:58.993 - Left Shoulder is not a valid member of Part 16:46:58.994 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.995 - stack end 16:46:58.996 - Left Shoulder is not a valid member of Part 16:46:58.997 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:58.998 - stack end 16:46:58.999 - Left Shoulder is not a valid member of Part 16:46:58.999 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:59.001 - stack end 16:46:59.001 - Left Shoulder is not a valid member of Part 16:46:59.002 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:59.003 - stack end 16:46:59.004 - Left Shoulder is not a valid member of Part 16:46:59.005 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:59.006 - stack end 16:46:59.007 - Left Shoulder is not a valid member of Part 16:46:59.008 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:59.009 - stack end 16:46:59.010 - Left Shoulder is not a valid member of Part 16:46:59.011 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:59.012 - stack end 16:46:59.013 - Left Shoulder is not a valid member of Part 16:46:59.014 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:59.015 - stack end 16:46:59.016 - Left Shoulder is not a valid member of Part 16:46:59.017 - Script "Workspace.Player1.Gun.WeldAnim", Line 29 16:46:59.018 - stack end
-------I'd also like to know why the function reran so many times. Here is the revised version of the script: |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 03:51 PM |
local Welds = {}
local player local character local motor1 local motor2
script.Parent.Equipped:connect(function(mouse) player = game.Players.LocalPlayer character = player.Character local center = script.Parent.Head.CFrame local newcenter = character.Head.CFrame ------------------------------------------- local head = script.Parent.Head local hd = character.Head local cx = hd.CFrame local headw = Instance.new("ManualWeld", hd) table.insert(Welds, headw) headw.C0, headw.C1, headw.Part0, headw.Part1 = hd.CFrame:inverse()*cx, head.CFrame:inverse()*cx, hd, head ------------------------------------------- for i, v in pairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then v.CFrame = newcenter*(center:inverse()*v.CFrame) end end motor1 = character.Torso["Left Shoulder"]:Clone() motor2 = character.Torso["Right Shoulder"]:Clone() Wait(0.03) character.Torso["Left Shoulder"]:Destroy() character.Torso["Right Shoulder"]:Destroy() for i = 1, 2 do local side if i == 1 then side = "Left" else side = "Right" end local v = character[side.." Arm"] local h = character.Torso local fa = script.Parent["Fake"..side.."Arm"] local cx = h.CFrame local w = Instance.new("ManualWeld", h) table.insert(Welds, w) w.C0, w.C1, w.Part0, w.Part1 = h.CFrame:inverse()*cx, v.CFrame:inverse()*cx, h, v v.CFrame = fa.CFrame end end)
script.Parent.Unequipped:connect(function() motor1.Parent = character.Torso motor2.Parent = character.Torso for i, v in pairs(Welds) do v:destroy() end character.Animate.Disabled = true character.Animate.Disabled = false character = nil player = nil end) |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 04:07 PM |
| NOT EVEN ONE *ATTEMPT* AT HELPIMG ME? nICEE. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 13 May 2013 01:56 AM |
| Bump... Thanks for all the help. |
|
|
| Report Abuse |
|
|
|
| 13 May 2013 10:05 AM |
| So, everybody here jumps at the opportunity to post on an off topic post, say to inform them where to go. (Truth is, those people are stupid and won't listen.) But NOBODY jumps to help a legitimate question with all the information necessary to help. Nice forum here. |
|
|
| Report Abuse |
|
|
|
| 13 May 2013 02:25 PM |
| I think I've set a record of some sort. How many times gone bumping without reply. |
|
|
| Report Abuse |
|
|
hawke2
|
  |
| Joined: 21 Dec 2010 |
| Total Posts: 610 |
|
| |
|
|
| 14 May 2013 01:09 AM |
| Bumping and sarcasm is a recipe for no help. You also have a relatively boring title. |
|
|
| Report Abuse |
|
|
pauljkl
|
  |
| Joined: 23 Oct 2008 |
| Total Posts: 9364 |
|
|
| 14 May 2013 12:14 PM |
local w = Instance.new("ManualWeld", h)
Try:
local w = Instance.new("Weld", h)
ManualWelds require a surface and are just studio's way of spamming things into games, if no luck then PM me and ill do a proper debug of it |
|
|
| Report Abuse |
|
|
|
| 14 May 2013 01:14 PM |
@Monkey - I'm here for help, not to show you all a fireworks display. It's not for entertainment. And I'm sorry, but after 11 bumps without ANY help, I feel I reserve some right to being a bit frustrated and the least insulting thing I could do is be sarcastic.
@Paul - Thank you. I'll see if it works. |
|
|
| Report Abuse |
|
|
|
| 14 May 2013 01:17 PM |
| Oh, and say I hadn't bumped it, NOBODY WOULD SEE IT. *Facepalm* |
|
|
| Report Abuse |
|
|
|
| 17 May 2013 10:27 PM |
| Bump. Still doesn't work. Thanks for trying, Paul. |
|
|
| Report Abuse |
|
|
|
| 18 May 2013 01:00 AM |
Hey FreeRunner, man,
U got to chill. When the code doesn't work, it's not the computers fault, man. Computers r stupid....We r the Apes.
Go 4 a walk; go at the problem a different way; grab some other script which solves the prob. with different methods....;
try to figure-out why Weld scripts usualy delete themselves.... Stop banging your head against the same brick-wall, expecting different results. That's the definition of insanity: "Temporary" is OK, as long as u recognise that it is your "own wheels which keep-on turning.....", man.
When shirt happens: Go to some other part of your code 4 a couple of days; and the answer pops into into of your dreams a few days later.... Neverfear.
Take a chill pill; this is only Cartoon rocket science, or we'd be on the moon, Brian
|
|
|
| Report Abuse |
|
|
|
| 18 May 2013 01:03 AM |
| Personaly, I've found u have to Weld the object by running the weld script; save the result; turf the weld script, and things usualy work-out.... |
|
|
| Report Abuse |
|
|
|
| 18 May 2013 01:13 AM |
What I'm trying to say is, "Get out of your own head, man", and yes, I had to re-iterate that, because it applies to so much, today!
|
|
|
| Report Abuse |
|
|
|
| 18 May 2013 03:03 AM |
| Except I have tried different methods, and studied different scripts to restructure this. The only reason I'm frustrated is because nobody is providing actual help. I'm not mad at the machine, I'm mad at the people for having the nerve to point out obvious troll posts, and linger around the spam, but when it comes to a legitimate question... Nobody bothers to answer it. |
|
|
| Report Abuse |
|
|