generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help!

Previous Thread :: Next Thread 
TheOne33 is not online. 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 is not online. TheOne33
Joined: 16 Nov 2008
Total Posts: 2788
26 Mar 2012 11:12 AM
bump...
Report Abuse
breuning is not online. 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
DragonFang1 is not online. DragonFang1
Joined: 02 Apr 2009
Total Posts: 1068
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 is not online. 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
DragonFang1 is not online. DragonFang1
Joined: 02 Apr 2009
Total Posts: 1068
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image