So what I am trying to figure out is that there appears to be some strange issue with a system we made for a main menu screen for players to join, which seems to have impacted our weaponry system at Haddock Tech.
To clarify further, devconsole was checked for any errors printed, and nothing did come up. Specifically where in Haddock Tech’s game, is the Headquarters.
What I have tried to do is see if I could just simply remove workspace.CurrentCamera, as it appears in the gun’s client script is also using this, and the same for the menu. However, it appears even then, the issue still persists, and is a very strange occurrence, as even it started working on studio. I published as I saw it worked on playtest, however it failed to work even in game.
I did look for possible solutions and/or mitigations, but nothing solved my case, and the issue still existed. However, it was not until I disabled/temporarily deleted the menu that the guns begun to work fine, which lead me to finding the root cause.
I will list the scripts, for the menu screen, and the gun’s client script.
, if found stealing these scripts/leaking, it could lead to a DMCA under our protection of the specified assets.
PLEASE ALSO NOTE THAT THE PROVIDED SCRIPTS ARE NOW REMOVED AS THE SOLUTION WAS FOUND.
So can you clarify further what the actual bug looks like? That is massively helpful to finding a cause. Like, do your guns still fire but the camera is all messed up? Or is the gun completely broken?
Ah. thank you for asking, so it appears the gun is completely broken, camera is completely fine. What I do know is that it fails to do the animation of holding the gun when equipped, so you’re just holding it out by the handle, and when shooting someone, it does shoot, but zero damage is done at all, but does reload.
I will supply some screenshots to differentiate the two.
(Playtesting, with menu enabled, and appears to be working):
What still perplexes me is how the gun will appear to just work sometimes fine on playtest in studio, but has stopped working before in studio, but in game? does not want to work whatsoever. Even refreshing/resetting my character to see if I can fix the problem makes no difference.
That also is strange, cause when I saw it seemed to work on studio, I had the impression it was gone, so I published in hopes it would even work in game, but nope.
I am also actively trying to see if I can get it to bug out again on studio during playtest.
I also wanted to note that these are the only warnings I am aware of, but I doubt it would also affect the guns, cause without the menu in a different facility at Haddock Tech, works just fine even with the supplied warnings;
as much as i also agree w this comment;
this is devforum after all
i wonder why this post screams self promotion to me in a way but thats just me.
either way id love to see the output you are getting, please show a screenshot when it doesnt play the animation, nacigate to view → output and send a looovely screenshot.
try adding prints like crazy, it may be the weirdest way of debugging but adding a few custom warns() and prints here and there have severly helped me and many in the past with debugging.
Ok, number one, I do not appreciate you are immediately jumping to conclusions when I am listing specifically where my issue is taking place, to provide context, and two, Thank you about the idea of debugging, I will set that up now. However, if you had not read, it seems to work almost 9/10 on playtest, and seems very rare that it would bug out on playtest, and instead, I will do that in game as I know that is where 10/10 it will break/bug.
Owner of HT here. We are genuinely asking for help here. Since we’re both stumped on how a main menu UI is somehow interfering with our weapons system.
send the main menu script then anyone who steals any code is a saddo and you cant change my mind; no need to add all these fancy marks all over the place because whats the point in stealing code and using it if you can’t understand and maintain it??
can i see that lovely lovely output i wanted to see? when it does break do it in studio if you can, ideally add warns and prints just because warns make it nice n yellow
I did think about potentially narrowing down few potential causes, as I noted the following for the menu script:
storing a Character reference and updating it on CharacterAdded:
local Character = player.Character or player.CharacterAdded:Wait()
...
player.CharacterAdded:Connect(function(newCharacter)
Character = newCharacter
end)
gun system listens for Humanoid movement or animations, but the menu restores the walkspeed and jumppower, and after the menu, I give myself the weapons, or click the loadout giver to receive the weapons, where it appears the guns stop working.
I am a bit confused but what I think you are saying is that when the menu is enabled, it will break the gun system in-game if that is right
have you tried commenting out all things revolving the camera in your menu screen, then testing in-game to see if that really is the problem? It can narrow things down a lot
If speaking more professionally, I suggest you review quite a few parts of the code. There are a lot of outdated and now practically useless nowadays structures. Rewriting the code to more modern standards will probably fix the issue you are having
Sir how long have you slept or maybe you are a time treveler from 2018?
You are yeilding for non existen object as since RbxUtility doesnt exist anymore since like 2020
ah. I see…I have known that it’s been used for as long as I am aware…however I do wish to know what other methods there are to implement into the weapon system? although realistically as of now there’s an issue with our menu somehow interfering with the weapon system.
However; the OP mentioned there is another way to use LoadLibrary still, which is this;