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

How do I make a flag that takes a few seconds to be captured?

Asked by 9 years ago
team = script.Parent 
flag = script.Parent.Parent.Flag
pole = script.Parent.Parent.Pole

function onTouch(hit) 
wait(5)
local user = game.Players:GetPlayerFromCharacter(hit.Parent) 
if user.Character ~= nil then 
team.BrickColor = user.TeamColor 
flag.BrickColor = user.TeamColor
pole.Handles.Color = user.TeamColor
end 
end 

script.Parent.Touched:connect(onTouch) 

So basically, after a few training with my war group, I found out that the flag I was using for raiding practice was too easy to capture. I tried to make a delay several ways, but I can't find an actual way to do it. Could someone help me? Thanks.

0
What I mean is that I want there to be a delay for capturing the flag, and if someone steps off during the capture, the entire capture is completely canceled. poisonmonkey 30 — 9y

Answer this question