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

How can I make a script make a message that says "Team eliminated"? [closed]

Asked by 3 years ago

Hello, I am creating a base destruction game and I want to make a script that when a base falls, it says: Team eliminated.

1
You really need to provide more info, and the code you use to "fell" the base. We have no idea what you are doing to let players destroy bases. WizyTheNinja 834 — 3y

Closed as Not Constructive by Soban06 and JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Gogulsky 129
3 years ago
Edited 3 years ago

You should probably take a look at Doomspire Brickbattle's scripts. This is what I found. The game link is https://www.roblox.com/games/5964395953

local c=y[s]:WaitForChild("GameValues",1):WaitForChild("Teams",1):GetChildren() -- values are being created inscript, using WaitForChild to avoid syntax errors 
                    for g=1,#c do -- Begin scanning in order to associate the GameValues with the actual game

                        if SpawnPart:IsA("SpawnLocation") then
                            if c[g].Value==SpawnPart.TeamColor then -- If one of the BrickColorValues in GameValues.Teams is equal to the SpawnLocation's TeamColor (NOT the spawn's BrickColor), then ...

                                c[g]:WaitForChild("Spawns",1).Value=c[g]:WaitForChild("Spawns",1).Value-1 -- ... subtract that team's spawn value in GameValues.Teams.[TeamName]. Remember, this is if one of the spawns is deleted.

                                if c[g]:WaitForChild("Spawns",1).Value==0 then -- If you have no spawns left, then you lose.

                                    y[s]:WaitForChild("GameValues",1):WaitForChild("TeamsLeft",1).Value=y[s]:WaitForChild("GameValues",1):WaitForChild("TeamsLeft",1).Value-1 -- This is vital to the game ending as a whole.

                                    game.Teams:FindFirstChild(c[g].Name).AutoAssignable=false
                                    local msg=Instance.new("Message")
                                    msg.Text=c[g].Name.." TEAM has been eliminated!"
                                    msg.Parent=workspace
                                end
                            end
                        end

Ad