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

How do i make so the player stays in his and doesn't change his team even if he died?

Asked by 4 years ago
Edited 4 years ago

Hello! I'm new for scripting teams and I'm making my tycoon with no kits or help from the toolbox. But I ran into a problem Where you can change teams even if you are in one so Please help. The script:

local sL = script.Parent
local claimed = false
sL.Touched:Connect(function(hit)
    if game.Players:FindFirstChild(hit.Parent.Name)and claimed == false then
        claimed = true
        local player = game.Players:FindFirstChild(hit.Parent.Name)
        player.Neutral = false
        player.Team = game.Teams.Blue
        if not player.Team.Blue then

        end
    end

end)
0
Can you include the script? youtubemasterWOW 2741 — 4y
0
Included it. Baselistic 103 — 4y

1 answer

Log in to vote
0
Answered by
Nckripted 580 Moderation Voter
4 years ago

I honestly don't think you need to do anything as long as no team has AutoAssign or whatever that boolean is called to automatically assign someone to a team.

Ad

Answer this question