Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Rainbow trail script not working? AGRRGGHHHH

Asked by 6 years ago

Revert to this for more info; https://scriptinghelpers.org/questions/46744/whats-wrong-with-my-gamepass-trails-again

local id = 971425430

game.Players.PlayerAdded:connect(function(player)
    if game:GetService("GamePassService"):PlayerHasPass(player, id) then 
        game.Players.PlayersAdded:Connect(function(player)
            player.CharacterAdded:Connect(function(char)
                local trail = game.ServerStorage.Trail:Clone()
                trail.Parent = char.Head
                local attachment0 = Instance.new("Attachment",char.Head)
                attachment0.Name = "trailAttachment0"
                local attachment1 = Instance.new("Attachment",char.Torso)
                attachment1.Name = "trailAttachment1"
                trail.Attachment0 = attachment0
                trail.Attachment1 = attachment1
            end)
        end)
    else
        print(player.Name .. " doesn't have the game pass...")
    end
end)
0
Im learning too and am having the same sort of issues, im not sure but i have a feeling its due to the fact that the Head and Torso parts of the character arent able to be accessed in that way but im not entirely sure sorry fridgeface 0 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago
id =971425430
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:Connect(function(char)
        if game:GetService("GamePassService"):PlayerHasPass(player, id) then 
            local trail = game.ServerStorage.Trail:Clone()
            trail.Parent = char.Torso
            trail.Attachment0 = char.Head.FaceFrontAttachment
            trail.Attachment1 = char.Torso.WaistBackAttachment
        end
    end)
end)

I think your problem is your Attachments aren't actually attachments

Ad
Log in to vote
0
Answered by 6 years ago

Sorry I forgot to say, I deleted line 5 and it worked so. Thanks to everyone who contributed!

Answer this question