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

How can I do this?

i have teams in my place yet I want it to say that a certain player is the owner and when another player joins it just says they are a visitor, how do I do this?

4 comments

0

You'd want to compare the player's UserId to that of the game.CreatorId, and if they match change their TeamColor to the color of the Team.

0

how would i script that xD

2

We are not a request site. You can check out a previous answer of mine to find sources on how to begin to script. https://scriptinghelpers.org/questions/9539/#12184

0

Give him a chance, hes new :3

1 answer

Please don't ask again for requests. For now here's the script:

game.Players.PlayerAdded:connect(function(player)
	repeat wait() until player.UserId ~= nil
	if player.UserId == game.CreatorId then
		print(player.Name,"Is the Owner of this game!")
	elseif player.UserId ~= game.CreatorId then
		print(player.Name,"Is a visitor of this game!"
	end
end

2 comments

0

There is no child named UserId, there's a property named UserIf though... Script would fail to work.

0

Dang I always get confused between children and properties... I'll add an edit to it.

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