|
| 27 Jan 2013 05:26 PM |
This script for some reason makes it so even if you're the team with the flag, the flag still goes down a second time local flag = script.Parent.Parent.Flag local timemin = script.Parent.Parent.Minutes local timesec = script.Parent.Parent.Seconds local ct = script.Parent.Parent.FlagTeam --String Value local ne = script.Parent.Parent.BottomBrick
ting = 0 function onTouch(hit) if ting == 0 then ting = 1 local hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil then local player = game.Players:GetPlayerFromCharacter(hum.Parent) if player then local teams = game.Teams:GetTeams() for i=1, #teams do if teams[i].TeamColor == player.TeamColor then PT = teams[i] t = teams[i] if PT.Name == "Good Peoplez" then PTC = "Bright blue" elseif PT.Name == "Bad Peoplez" then PTC = "Bright red" else print("not a team") end end end if PT ~= ct.Value then for i=flag.CFrame.Y, ne.CFrame.Y, -.1 do flag.Position = Vector3.new(flag.CFrame.X, i, flag.CFrame.Z) wait(.01) end wait(1) flag.BrickColor = BrickColor.new(PTC) wait(1) for i=ne.CFrame.Y, script.Parent.Parent.Head.CFrame.Y-5, .1 do c t . V a l u e = P T . N a m e -- had to space to post for some reason flag.Position = Vector3.new(flag.CFrame.X, i, flag.CFrame.Z) wait(.01) end t.Score = t.Score+2 timemin.Value = 0 timesec.Value = 0 else print("STOOPID") end ting = 0 else end else end else end end
script.Parent.Touched:connect(onTouch)
|
|
|
| Report Abuse |
|
| |
| |