Implement a MouseClick occasion listener for the part. Then use the playerWhoClicked parameter come determin which player clicked. In that listener entrust a Team circumstances to the players Team property.
You are watching: How to add teams in roblox studio
First, you are going to must insert a Team thing in the teams organization in the explorer. If the doesn"t display up there, click on "model" > "Services" > "Teams" and also click the switch "Insert":
Then Insert a Team thing in the groups service and customize it as you want.
After that create a part in the workspace and also place a script and a click detector in it.
And then, ar this manuscript in it and make alters to to the right your game specifically:
local TeamsService = game:GetService("Teams")-- Wirte your team"s surname in the wait for childlocal Team = TeamsService:WaitForChild("Noobs")local ClickDetector = script.Parent:WaitForChild("ClickDetector")local role AssignTeam(Player) Player.Team = TeamendClickDetector.MouseClick:Connect(AssignTeam) Also, click detector works for mobile as well.
boost this price
answered Apr 19 at 10:48
Arthur Buzas BaccanArthur Buzas Baccan
9811 silver- badge66 bronze title
include a comment |
Thanks because that contributing an answer to ridge Overflow!Please be sure to answer the question. Carry out details and also share her research!
But avoid …Asking for help, clarification, or responding to various other answers.Making statements based on opinion; back them increase with referrals or personal experience.
To find out more, view our advice on writing great answers.
See more: How Long Can Lava Lamps Be Left On All Night ? How Long Can I Leave My Lava Lamp On
Sign up or log in
authorize up using Google
sign up using Facebook
authorize up making use of Email and Password
Post as a guest
email Required, but never shown
Post as a guest
Required, however never shown
post Your answer Discard
Not the price you're spring for? Browse other questions tagged lua roblox or asking your very own question.
The Overflow Blog
Featured top top Meta
ROBLOX - Why is this fly script working just in the Studio?
C-Frame slide Door in Roblox Studio manuscript
just how to make a part that alters your team in Roblox Studio
Roblox just how to recognize a player's team
Roblox studio how to detect an essential inputs?
Roblox computer animation not playing as soon as I click
exactly how to rank captain come the first player to join a team roblox studio
exactly how to solve Players.louie43pro.PlayerGui.admin.Frame.LocalScript:10: supposed identifier as soon as parsing expression, gained ')' error roblox studio?
hot Network inquiries much more hot concerns
subscribe to RSS
inquiry feed To subscribe to this RSS feed, copy and paste this URL right into your RSS reader.
stack Exchange Network
site design / logo design © 2021 ridge Exchange Inc; user contributions licensed under cc by-sa. Rev2021.9.24.40305