How to make a hat gamepass?

so i make this game recently and first i wanna know is this

2 Likes

You should update your model to an accessory, once it’s an accessory just use the code that I posted earlier (with the Accessory parented to the script, (name of the Accessory does not matter).

Make sure the script is under ServerScriptService.

ok i will try

1 Like

but the accesory i need to put it in replicatedstorage? or in where?

1 Like

Please read my post.

wait i’m gonna put a image if what i do is good ok?

1 Like

this isn’t working idk why if you see the problem…

2 Likes

It’s working for me.image

Is it possible you send me a Game File for me to investigate?

1 Like

isn’t working

1 Like

Please read my entire post.

how i can send you a game file?

1 Like

Save the place as a .rblx and DM me it. Read up on it here https://wiki.roblox.com/index.php?title=Manual/Studio_Overview/Publishing_and_saving

1 Like

i send it

2 Likes

In the future, please ensure that you post any errors that get generated. This error I found and was able to fix. I think the error message is self explanatory.

Model:GetPrimaryCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.

A primary part should be set so that the character can be spawned correctly

Sidenote: your game has a virus under game.StarterPlayer.StarterCharacterScripts.121120

4 Likes

oh yes i think is a plugin i have…

2 Likes

IT WORKS :smiley:

3 Likes

Please mark the appropriate thread as a solution so others know this thread is solved, I believe you should mark this

1 Like

Thank you so much!

3 Likes

OP… I really suggest that you check out the Developer Hub if you are interested in learning code or how to accomplish things. There are many tutorials in and around the site which would avoid the need to ask about each and every post made in response to your question.

Scripting Support is not a location to ask for code.

14 Likes

Do not ask for code in Scripting Support. Follow category guidelines in the future: