Trail is not attached to HumanoidRootPart even though I own the gamepass

  1. What do you want to achieve? Keep it simple and clear!

I trying to make a trail script. So, when player join the game. The server will check if the player own the gamepass from their userID. If the player owns the gamepass then there will be a trail attached to their HumanoidRootPart and when they walk a color will follow them.

  1. What is the issue? Include screenshots / videos if possible!

the trail doesn’t come out of the HumanoidRootPart even though I own the gamepass. I publish and tried it in game but I’m still having the same problem and there isn’t any error in the output.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I tried doing some research on google and the developer forum but couldn’t find a way to fix it.

  • Script in ServerScriptService
  • Trail in ServerStorage
local MarketplaceService = game:GetService("MarketplaceService")

game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		if (MarketplaceService:UserOwnsGamePassAsync(player.UserId, 18545042)) then
			local Trail = game.ServerStorage.Trail:Clone()
			Trail.Parent = char.Head
			local attachment0 = Instance.new("Attachment")
			attachment0.Parent = char.Head
			attachment0.Name = "Attachment0"
			local attachment1 = Instance.new("Attachment") 
			attachment1.Parent = char.HumanoidRootPart
			attachment1.Name = "Attachment1" 
			Trail.Attachment0 = attachment0 
			Trail.Attachment1 = attachment1
		end
	end)
end)

I would really appreciate if someone could help me

Make sure you set the trail to enabled and give it a lifetime. Here’s a good post about a very similar problem: Need help with Trail Gamepass - #10 by Avallachi

Oh, I’m dum, I didn’t put Enable it was disable the entire time xd

Thank you so much bro! :smile:

1 Like