Posted
Here's a script I use to assign a person to a certain team in rblx studio, however, I want to assign multiple people. Adding a comma and their name doesn't work for some reason...
local Owner = game.Teams.Staff
game.Players.PlayerAdded:Connect(function(player)
if player.Name == "EstabMort" then
player.Team = Owner
end
end)
--How do I add multiple people in the player.Name so multiple people can be automatically assigned to the team?
https://gyazo.com/9e36f19dea3a77fbcdc641f0276c4cd8
"I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda."
Replied
Shh, I'm not sure I can do that from a localscript.
Cancel
Post
I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.
Replied
@68837It's not an exploit script It's for my game that I can edit w/ rblx studio
Cancel
Post
https://gyazo.com/9e36f19dea3a77fbcdc641f0276c4cd8
"I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda."
Replied
local Owner = game.Teams.Staff
local users = {"user1", "user2", "user3"} --change users to your liking delete them or add them
game.Players.PlayerAdded:Connect(function(player)
if player.Name == users then
player.Team = Owner
end
end)
--idk i dont code in luaCancel
Post
10 years ago
I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.
Replied
simple.
local owners = {
"EstabMort", "TheJ"
}
local Owner = game.Teams.Staff
game.Players.PlayerAdded.Connect(function(player)
for i, v in pairs(owner) do
if player.Name == owner then
player.Team = Owner
end
end
end)Cancel
Post
Added
@child1010
just so you know, in your script you're comparing a player instance to a table
Cancel
Post
Replied
local Staff = {
"EstabMort",
"plr2 idk"
}
game.Players.PlayerAdded:Connect(
function(player)
if table.find(Staff, player.Name) then
player.Team = game.Teams.Staff
end
end
)
Cancel
Post
https://cdn.discordapp.com/attachments/909012795851407390/927492917394821140/siggy.png
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post