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

how do you Make a certain player be on a certain team?

Asked by 6 years ago

Ive been struggling on this for some time now i am pretty new to scripting so any help?~~~~~~~~~~~~~~~~~local tp = game.Teams.Official game.Players.PlayerAdded:Connect(function(player)

player.CharacterAdded:Connect(function(character)

    if player.Name == "WillBe_Stoped" then
        local person = game.Players:GetPlayerFromCharacter(player.Name)
        person.tp=true
    end
end)

end)~~~~~~~~~~~~~~~~~

1 answer

Log in to vote
0
Answered by
Prestory 1395 Moderation Voter
6 years ago
Edited 6 years ago
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
 if player.Name == "WillBe_Stoped" then
        local person = player
        person.Team = tp
    end
    end)
end)
0
doesnt work it doesnt know what "player" is WillBe_Stoped 71 — 6y
0
Is this a local script or a script? Prestory 1395 — 6y
0
Also what line is the error occuring on? Prestory 1395 — 6y
0
it is a script WillBe_Stoped 71 — 6y
View all comments (5 more)
0
Try the edited version i just edited up their ^ Prestory 1395 — 6y
0
add me on discord and figure this out cause i dont get it (ItzWill#8788) WillBe_Stoped 71 — 6y
0
It says incorrect discord Prestory 1395 — 6y
0
Zeno#8788 WillBe_Stoped 71 — 6y
0
try that WillBe_Stoped 71 — 6y
Ad

Answer this question