TheOne33
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 2788 |
|
|
| 26 Mar 2012 11:11 AM |
This is the oddest glitch Ive ever seen. I am currently trying to create a CTF mode for one of my Round-Based Games. But there is a strange bug where the flag that is on the stand will vanish. The output has not said anything.
function onTouched(part) if game.Players:GetPlayerFromCharacter(part.Parent.Name) ~= nil then playa = game.Players:GetPlayerFromCharacter(part.Parent.Name) if game.Players[part.Parent.Name].TeamColor == BrickColor.Blue then if game.Players[part.Parent.Name].GotFlag.Value == false then if Workspace.GotaFlag.Value == false then game.Players[part.Parent.Name].GotFlag.Value = true Workspace.WhoHasFlag.Value = player wait() Workspace.GotaFlag.Value = true end end end elseif player.TeamColor == BrickColor.Red() and player.GotFlag.Value == true then Workspace.CTFRed.Value = Workspace.CTFRed.Value + 1 end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
TheOne33
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 2788 |
|
| |
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 26 Mar 2012 11:16 AM |
function onTouched(part) if game.Players:GetPlayerFromCharacter(part.Parent.Name) ~= nil then player = game.Players:GetPlayerFromCharacter(part.Parent.Name) -- Playa? if game.Players[part.Parent.Name].TeamColor == BrickColor.Blue then if game.Players[part.Parent.Name].GotFlag.Value == false then if Workspace.GotaFlag.Value == false then game.Players[part.Parent.Name].GotFlag.Value = true Workspace.WhoHasFlag.Value = player wait() Workspace.GotaFlag.Value = true end end end elseif player.TeamColor == BrickColor.Red() and player.GotFlag.Value == true then Workspace.CTFRed.Value = Workspace.CTFRed.Value + 1 end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2012 11:25 AM |
if this is right
BrickColor.Blue
then this is wrong
BrickColor.Red()
or the opposite I am not sure. |
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 26 Mar 2012 11:30 AM |
BrickColor.Red() == Right
I would use BrickColor.new("Bright red") anyway. |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2012 11:34 AM |
so ,BrickColor.Blue is wrong. and yea I always use BrickColor.new("Blue") so i don't know which is right :P |
|
|
| Report Abuse |
|
|