Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How can I do this?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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?

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. M39a9am3R 3210 — 8y
0
how would i script that xD Trixtin 0 — 8y
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 M39a9am3R 3210 — 8y
0
Give him a chance, hes new :3 LateralLace 297 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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
0
There is no child named UserId, there's a property named UserIf though... Script would fail to work. M39a9am3R 3210 — 8y
0
Dang I always get confused between children and properties... I'll add an edit to it. LateralLace 297 — 8y
Ad

Answer this question