I have tried and tried again and no matter how I go upon it, it has failed me, I am attempting to make the defense team have a working message saying "Defenders win in" and "Defenders have won!" But I am pretty new at scripting so this makes only little sense to me, so whenever I have attempted to fix it in order for it to be on defense team to It just turns it off ( without my editing) After I got done editing it just stopped working entirely, than i Undone my edit and it still did not work entirely.

timeuntilwin = 180
totaltime = 180

raidteamcolor = "Really red" 
defendteamcolor = "Really black" 
h = Instance.new("Hint") 

function OnTouched(hit) 

	if hit.Parent:findFirstChild("Humanoid") ~= nil then 
		if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == BrickColor.new(raidteamcolor) then 
				script.Parent.BrickColor = BrickColor.new(raidteamcolor) 
		end 
		
		if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == BrickColor.new(defendteamcolor) then
				script.Parent.BrickColor = BrickColor.new(defendteamcolor) 
				timeuntilwin = totaltime  
				for i, v in pairs(game.Workspace:GetChildren()) do 
					if v:IsA("Hint") then 
							v:remove() 
					end 
				end 
		end 

	end 

end 

script.Parent.Parent.Base.Touched:connect(OnTouched) 

				while true do 
						wait()
					if script.Parent.BrickColor == BrickColor.new(raidteamcolor) then 
						h.Parent = game.Workspace 
						h.Text = "Raiders win in".." "..timeuntilwin 

						if timeuntilwin <= totaltime  and timeuntilwin > 0 then 
						wait(1) 
						timeuntilwin = timeuntilwin - 1 
						end

						if timeuntilwin == 0 then 
							h:remove() 

							winmsg = Instance.new("Message") 
							winmsg.Parent = game.Workspace 
							winmsg.Text = "Raiders win!!!" 
							wait(5) 
							
						
						end 
					end 
				end 

How would you Fix it to do that?

5 comments

0

This is also for a CLAN to so thank you c;

0

It's being downvoted probably because you haven't explained the problem in detail.

0

Ohhhhh Okay Ill re-edit again and try to explain it better.

0

I wish I could downvote this.

0

Icy, you can just delete this post, you don't have to try and moderate it.