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

Custom pants script not working on spawn?

Asked by 3 years ago
game.Players.PlayerAdded:Connect(function(player)
    p.CharacterAdded:Connect(function(char)
        player.Team = "Neutral"
        if player.Team == "Neutral" then
            char.Pants.PantsTemplate = "https://web.roblox.com/catalog/517704061/Salon-Spa-Robe"
        end

    end)

end)

I was trying to make when the neutral team spawns they spawn with a custom spa robe.

1 answer

Log in to vote
0
Answered by 3 years ago

I don't think Natural is a proper team, it's just a thing that un-teamed players are put on.

  • You defined the player as "player" but then refered to it as "p"

-- Adding the team, feel free to edit this to whatever, or delete it if you added it into `game.Teams` local team = Instance.new("Team") team.AutoAssignable = true team.Name = "Spa Guest" game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) if player.Team == game.Teams["Spa Guest"] then char.Pants.PantsTemplate = "rbxassetid://517704061" -- char.Shirt:Destroy() -- Uncomment the line above if you want to remove the player's shirt. end end end

Hopefully this helps,

I wish you, and your team the best of luck with your game!

0
thank you!! Ponytails2017 83 — 3y
0
but where do i put the script? Ponytails2017 83 — 3y
0
Sorry for the late reply, put it in Server Script Service. Blxefirx 31 — 2y
Ad

Answer this question