Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to checking on witch team is player?

I am trying to make a system witch would check on what team is player and if its for example on team 1 then he gets teleported to other position.

local Teams = game:GetService("Teams")
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
	if player.Team == "Level1" then
		game.Players.LocalPlayer.character.LowerTorso.CFrame = CFrame.new(-546.6, 25, -2.9)
	end
end)

1 answer

✓ Accepted answer

Here:

if player.Team == game.Teams['team name'] then -- Check in game.Teams, dont use a string

Hope this helps!

1 comment

0

bruh who downvoted me

This discussion is preserved as it was. New answers, comments, and votes are closed.