|
| 18 Mar 2013 12:28 PM |
Alright, so SN0X and me are attempting to 'debug' my gunscript due to the fact that it had failed to align the arms properly in first person.
However, alone (1 person) in the server, the gun seems to work perfectly fine. However, when another person enters the server, the gun seems to break and not align themselves properly and sometimes not able to function.
We've tested this continuously with different structural and prioritising options for the functions and events, but came to a conclusion;
We think it's ROBLOX networking issues. (Somewhat)
I think this due to the fact that, when SN0X left, and I obtained a new copy of the tool of the gun, the gun seems to work fine and are aligned properly, whilst if a new person were to come, the gun would seem to stop working.
Is there any possible reason to this?
Would multi-threading (aka Spawn() ) the problem to this because... maybe ROBLOX limits multi-threading?
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 12:32 PM |
| Is this all in one script, controlling aligning arms for every player? |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 18 Mar 2013 12:42 PM |
No, it's a local script in a tool.
Works in solo mode.
Works in server with 1 player.
Breaks with 2+ players. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 12:43 PM |
@Pre; They're individual gunscripts xD
Mysteriously though, when one gun breaks, all the other breaks. So if one player's gun somehow breaks, the others break too. And when you join, it works 100%, whilst when another person joins, it breaks - all even though there's no specific intentional connection made between the guns inside the script.
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 18 Mar 2013 12:49 PM |
No, they don't break at the same time...
These bugs have no patterns, they happen randomly. Sometimes the gun breaks as soon as you equip it....
There are 2 main bugs:
-Sensitivity up/down arm movement goes high or low -Arms completely un-align
Both happen only when 2 or more players are present in the server, and they are very common - whenever we change something in the script, we know whether or not it worked within a couple of minutes (which is convenient).
However, the annoying part is, I have no idea what is causing the problem. Like Candy said, we know it has to do with the networking, but all it is is moving the head up/down to face where you're looking and bring the arms with it.......nothing to do with other players, and it's even local.... |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 18 Mar 2013 12:51 PM |
I doubt it has anything to do with multithreading, Candy.
I'm pretty sure those threads are ran in the same environment, and still locally. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 12:51 PM |
Well they mostly happen on a pattern. >.>
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 18 Mar 2013 12:52 PM |
| Try using coroutine.resume(coroutine.create(function() end)) instead of Spawn(). I've had some pretty funky results using Spawn, all of which were unintended. But the same code seemed to work fine using coroutines. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 12:53 PM |
| How is your LocalScript structured? Does it access any parts of the game besides the tool itself? |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 12:56 PM |
^ Nope.
Also, isn't Spawn() the same as coroutine.create() and coroutine.pause() or coroutine.remove() or whatever?
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 18 Mar 2013 12:57 PM |
| Apparently due to my testing, it isn't the same. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 18 Mar 2013 01:11 PM |
Spawn() creates a real thread
coroutines are wannabe fake threads
k. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 01:13 PM |
@SN0X Does the issue appear when you shoot the weapon? When you equip it? Randomly while you're holding it? |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 18 Mar 2013 01:17 PM |
Randomly whilst holding it. Can't find any pattern- one of the reasons why it's hard to fix
Q key sometimes break the gun, but that's a separate bug, easy to fix (Q = replenish ammo, probably something to do with that). Not our priority at the moment
Well I dunno, we're quite lost.
ctrl-H
Spawn( --> coroutine.wrap(
Still doesn't work; it seems Spawn is not to blame here. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 01:21 PM |
| Do you have sway, like your gun is randomly moving around while holding? |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 01:30 PM |
Wow, this is an ass of a bug.
It really sounds as if you are controlling all guns from one server script and you haven't localised variables and different functions are crossing over with variables and setting them and that stuff.
I really don't know what is up with your scripts. What you are experiencing is very very weird... |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 18 Mar 2013 01:42 PM |
@destroyer,
Yes, we had sway. Removed it temporarily to see if it was the issue...and....nope, still didn't work.
@Prehistoric,
Yup yup, sounds like it, but no, it's all in one local script with local variables and such
Source: 7vbZhhnP pasted in the bin |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 18 Mar 2013 01:43 PM |
| MoveArms function is on line 163, btw |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 01:51 PM |
What he means by one local script is that, one local script in each gun, which are all independent of one another.
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
HaxHelper
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 1208 |
|
|
| 18 Mar 2013 01:53 PM |
Sounds like an animation bug; I don't think this is caused by any coding problems, but rather as an unintended effect. Animating arms that move up and down is tricky, and I'd bet that it's some kind of problem with that.
Also, Y U NO KEYFRAMES? ಠ_ಠ |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2013 10:24 PM |
Aren't keyframes part of the animation object? We're not able to use that.
Basically, the arms are welded to the head, in which the head basically CFrames itself to look at where the camera is looking at.
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
HaxHelper
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 1208 |
|
|
| 18 Mar 2013 10:32 PM |
So that basically rules out the potential animation problems. Also, it is possible to do keyframes in code - use for loops.
for i = 0, 1, 0.1 do --where 0 is start, 1 is end, and 0.1 is the step increment wait() weld.C0 = CFrame.new(1*i, 0, 0) * CFrame.Angles(1.75*i, 0, 0) end
Each of these "blocks" is a keyframe. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2013 02:10 AM |
Oh if you're talking about that kind of keyframes, then yes we'd use some of that in the code, but without the for because of maintenance(lol) reasons.
Also, all the animations were fine, the main problem was the arm welds were not aligned to the camera's direction - the gun movement lagged when looking horizontally and sometimes the camera's vertical sensitivity were too much in that, if you looked up for a little, the gun would shoot straight up at 90 degrees at a fast rate.
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 19 Mar 2013 11:20 AM |
Candy don't confuse them pls, that's a different bug (fast shooting)
Bug: arms unallign, and sometimes they act really sensitive (arm acts as if you're moving the mouse 2x faster than you already are...)
For the sensitivity, it only really happens up/down, not horizontally.
When? Randomly whilst there are 2 or more players in the server
How often? It's super common - once every couple of minutes or so |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 19 Mar 2013 12:16 PM |
| When the mouse is moving up and down, divide the speed it's going at by 2? |
|
|
| Report Abuse |
|
|