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

[CLOSED] Checking the team of a player how?

So I don't know why it doesn't check the player's team , "player" is well assigned

event.OnServerEvent:Connect(function(player, request)
	if request == "Starting" and player.Team == game.Teams.Host then
		event:FireAllClients("Startit")
	end
end)

1 answer

local Teams = game:GetService("Teams")

if player.Team == Teams.Host then
	--code
end

10 comments

0

Didn't work

0

print(player.Name) returns my name

0

the only thing i can think of then is that in your if statement "request" isnt "Starting"

0

It is, I checked without the player team thing and it works

0

try adding a print inside the if statement and let me know if it prints

0

Does not print after "if request == "Starting" and player.Team == game.Teams.Host then", but before yes. If its only " "if request == "Starting"" it works

0

and you're on the host team right?

0

Yup

0

Im clueless

0

Sameee

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