Hello, I am creating a base destruction game and I want to make a script that when a base falls, it says: Team eliminated.
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
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?