Gamepass Asset wont load correctly? (R6)

So recently I have started a group and I wanted to add a gamepass for guns.

The game is R6 and the guns are for R6 and I have a script inputted to give the asset to the player who bought the gamepass.

However when the player is in game, the gun doesn’t appear?

If you have any solutions it would be greatly appreciated!

I don’t really see what you mean by it doesn’t show up, I assume that you are saying that the gun is successfully given to the player, however the gun doesn’t show when equipped; thus does the gun have a handle?

1 Like

I have never worked with guns so this isn’t something I had thought about, it doesn’t appear to have a handle, no.

Without a handle, the gun won’t be able to get welded to the Player’s RightHand/RightArm(R6) when equipped, thus it won’t show.

You should probably setup a BasePart inside of the tool, Named “Handle”, make sure to position it where you want the gun to be gripped from.

Should I insert a R6 block rig to position its handling; and input a part named Handle into the gun?

You should probably just put the handle where the gun’s handle is supposed to be.

If you are talking about the tool’s grip, as in at what angle/position the tool should be held at, that will be configured under the tool’s properties: GripPos, GripForward, GripRight and GripUp.

image

And if you are indeed talking about the tool’s grip, I suggest either purchasing this plugin or launching a playtest in-studio and changing the values on a trial and error basis, or even setting up an idle animation to change the tool’s grip, more can be found on animating tools here.

The animation route is probably second to the plugin route in terms of “easiness”.

Well the tool has no handle, but has a grip. I added the handle in the game to see a difference and the gun did appear, just it stayed in the air floating rather than in my hands position. Im not sure of what you’re explaining to me, could you kind of elaborate in a way?

This is my tool’s handle part, so this is where the tool will be gripped from
image

Please make sure your handle part isn’t miles away from the actual part where the gun is supposed to be gripped from

I have the handle where it should be. The problem now is that the gun appears floating in the air rather than my hand, so when I anchor the handle I teleport to the gun where it rests when I place it into replicated storage.

Another problem is that none of the guns scripts load, its just a model. So I cannot fire the gun when I click. It just sits there.

While Handle is anchored


While Handle is unanchored

While in StarterPack

When its in starterpack, everything works beautifully.

Only when its cloned, is it that the gun doesn’t work correctly.

You have to weld all of the parts to the handle, you can use this plugin to easily achieve this, then simply just unanchor the handle and you should be good to go.

As for the scripts, I’m not really sure why they aren’t working, check to see if there’s any error output

Is this being done through a local script or a server script (the cloning?).

Also check F9 for errors, that is the biggest indication a weapon is broken.

Ahh excuse that I just woke up, and didn’t realize what I had done. it was being done through a script I put in workspace.

For weapon giving scripts, unless it’s through a click detector you should always keep the script within the ServerScriptService. This is both for your ease and for good practice. Floating scripts aren’t the best either.

Where is the weapon being stored previous to being given??

ReplicatedStorage. It’s based off of 2 scripts. One in a screen GUI which you can buy the gun off of(using a click detector), and the other that actually clones and hands the player the gun.

If its being done from a script, you can use ServerStorage for holding your weapons - this is also a lot safer from exploiters by the way. It also provides Server side replicas.

It is likely something due to the gun engine your using, waiting for something for example - its difficult to judge from what you’ve given though.

Well what should I look for if I want a certain gun with the correct scripts?

Well to begin with, in the F9 console things such as “infinite yield possible” in relation to the gun script.

It’s difficult for me to help you with specific gun scripts, especially when I only use my own engine.