Rainbow trail game pass and user only trail

I am wanting to make a rainbow trail game pass for my Resort. I do not really know where to start. I also Want 1 for 1 specific user which will be different colors then the rest. How would I go about that?

4 Likes

Check if they own the games pass. Connect to the character added event a function which adds the trail if they own it.

Check their user id. Connect to the character added event a function that checks for the user id and if so adds the trail.

local gamepassid = 000000
local specialId = 000000
game.Players.PlayerAdded:Connect(function(plr)
local gamepassOwned = game:GetService('MarketplaceSevice'):UserOwnsGamepassAsync(plr.UserId, gamepassid)
local isSpecial = plr.UserId == specialId
plr.CharacterAdded:Connect(function(char)
      if isSpecial then
            --Give special trail
      end
      if gamepassOwned then
       --Give gamepass trail
      end
end)
end)
6 Likes

Not really a scripter. So I would not know how to go about scripting the entire thing.

2 Likes

UserOwnsGamePassAsync should be used for checking if the player has a gamepass, but if you also want a specific user to have it, you should check a specific userid.

Also, I personally recommend using StarterCharacterScripts over .CharacterAdded events.

-- in starter character scripts
local MarketPlaceService = game:GetService"MarketPlaceService"
local Players = game:GetService"Players"
local player = Players:GetPlayerFromCharacter(script.Parent)
local s,owns = pcall(MarketPlaceService.UserOwnsGamePassAsync,MarketPlaceService,player.UserId,gamepass_id)
if not s then
    owns = false
end
if owns then
    -- create the trail
end
2 Likes

You should try researching online first before asking people for help.

The video talks about using gamepasses and how it works.

A bit outdated so you would also have to remove some parts and replace with UserOwnsGamePassAsync or the example that @Halalaluyafail3 or what @REALTimothy0812 gave.

The video talks about how to attach the attachments to the character then give the trail to the character and setting the points via where the attachments were.

2 Likes

#scripting-support is not really for getting free scripts. It is meant for support, not scripts. However, I edited my above reply to integrate what you wanted. Several people posted items on how to add trails, so if you add them together you will be fine.

Scripting is not a world where everything comes easy; It requires work. However, if you put a bit of work into it, anything is possible. :grinning:

7 Likes

Thanks. Also, I usually Have a scripter but this is urgent has part of a major update and my scripter is out of country. Otherwise He would have done it.

1 Like

Even if scripting is not your main field, it doesn’t hurt to learn a bit. Knowledge is powerful.

Hopefully you will be able to figure it out.

3 Likes

As a builder, scripting can actually be really useful in some cases while even building. It can help you do tasks easier with ease using math or other useful functions along the way. Its a good tip to try to learn a little bit of coding which could make your life much more easier in some cases.

2 Likes

Also thanks for your guys help. image

2 Likes

Both StarterCharacterScripts and .CharacterAdded behave the same. Neither is better of the other, it just depends how you prefer to think about object hierarchy.

StarterCharacterScripts and .CharacterAdded both pass the ability to get the character.

1 Like

No they don’t. StarterCharacterScripts is a container, CharacterAdded is an event. The contents of StarterCharacterScripts are copied to the character when it is added. CharacterAdded fires when the character is fully set up and ready to be used.

See the following article regarding CharacterAdded and it’s placement in the character loading order:

The contents of StarterCharacterScripts may be copied some time before (or after) CharacterAdded fires, but they don’t run in parallel. They may have identical use cases, but the two themselves are not the same.

3 Likes