|
| 30 Sep 2016 10:58 PM |
message("Time To Start The Game!",5); for i,v in pairs(game.Players:GetChildren()) do if v.TeamColor==away.TeamColor then v.Character.Torso.CFrame=CFrame.new(92.212, 1.001, -49.616) else if v.TeamColor==home.TeamColor then v.Character.Torso.CFrame=CFrame.new(-92.308, 1.049, 361.391) wait(7) message("Here Are This Matchup's Teams!",5) wait(7) message((away.Name).." Is Your Away Team!",5); game.Workspace.awayroom.door.CanCollide = false game.Workspace.awayroom.door.Transparency = 1 wait(10) game.Workspace.awayroom.door.CanCollide = true game.Workspace.awayroom.door.Transparency = 0 wait(5) message("Here Are Your "..home.Name,5); game.Workspace.homeroom.door.CanCollide = false game.Workspace.homeroom.door.Transparency = 1 wait(10) game.Workspace.homeroom.door.CanCollide = true game.Workspace.homeroom.door.Transparency = 0 end end end |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2016 10:59 PM |
Don't worry about the stuff on the bottom.. Its just the stuff on top... the for loops! It only teleports a couple of players to the room... The CFrame destination is a brick position... |
|
|
| Report Abuse |
|
|
| |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 01 Oct 2016 02:16 AM |
message('Time To Start The Game!',5)
for i,v in next, game.Players:GetPlayers() do if v.Team == game.Teams.Away then v.Character.Torso.CFrame = workspace.AwaySpawn.CFrame elseif v.Team == game.Teams.Home then v.Character.Torso.CFrame = workspace.HomeSpawn.CFrame end end
wait(7) message('Here Are This Matchups Teams!',5) wait(7) message(away.Name..' Is Your Away Team!',5) workspace.awayroom.door.CanCollide = false workspace.awayroom.door.Transparency = 1 wait(10) workspace.awayroom.door.CanCollide = true workspace.awayroom.door.Transparency = 0 wait(5) message("Here Are Your "..home.Name,5) workspace.homeroom.door.CanCollide = false workspace.homeroom.door.Transparency = 1 wait(10) workspace.homeroom.door.CanCollide = true workspace.homeroom.door.Transparency = 0
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 12:49 PM |
| Don't you have to have a cFrame.New? |
|
|
| Report Abuse |
|
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 02 Oct 2016 12:51 PM |
No, the CFrame value inside Parts basically are CFrame.new(the position)
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 12:54 PM |
| And btw it still doesn't teleport everyone... |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 12:56 PM |
My code:
message("Time To Start The Game!",5); wait(7) game.Workspace.stadiummus:Play() for i,v in pairs(game.Players:GetChildren()) do if v.TeamColor==away.TeamColor then v.Character.Torso.CFrame = workspace.awaytele.CFrame wait(1) for i,v in pairs(game.Players:GetChildren()) do if v.TeamColor==home.TeamColor then v.Character.Torso.CFrame = workspace.hometele.CFrame wait(7) message("Here Are This Matchup's Teams!",5) wait(7) message((away.Name).." Is Your Away Team!",5); game.Workspace.awayroom.door.CanCollide = false game.Workspace.awayroom.door.Transparency = 1 wait(10) game.Workspace.awayroom.door.CanCollide = true game.Workspace.awayroom.door.Transparency = 0 wait(5) message("AND NOW",5); wait(7) message("Here Are Your "..home.Name,5); game.Workspace.homeroom.door.CanCollide = false game.Workspace.homeroom.door.Transparency = 1 ################################################################################################################################################################################ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 02:28 PM |
LEARN HOW TO DEBUG YOUR CODE.
MY CODE WORKS FINE
|
|
|
| Report Abuse |
|
|
DevDays
|
  |
| Joined: 16 Dec 2015 |
| Total Posts: 112 |
|
|
| 02 Oct 2016 02:32 PM |
@TimeTicks Chill.
@PennslyvaniaRoadGeek Make sure all players are in a team, secondly.
Don't put this inside the loop: v.Character.Torso.CFrame=CFrame.new(-92.308, 1.049, 361.391) wait(7) message("Here Are This Matchup's Teams!",5) wait(7) ...
kappa |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 02:36 PM |
@Ticks
Bro... This is my version of football legends... There are 32 teams and the game picks out 2 of them random... so I can't just name a team thats why there is a value of home and away... the teams are in lighting and the master script has over 1000 lines of code... |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 02:38 PM |
| @Dev how will it work if its not in the loop... |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 02:41 PM |
Then change it to teamcolor. It doesnt matter!!! Yuo can still use my code
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 02:44 PM |
Then change it to teamcolor. It doesnt matter!!! You can still use my code
|
|
|
| Report Abuse |
|
|
DevDays
|
  |
| Joined: 16 Dec 2015 |
| Total Posts: 112 |
|
|
| 02 Oct 2016 02:45 PM |
Firstly, your code is really messed up, no offence.
First error, using changing the torso CFrame is a bad idea, you should be using the head/primaryPart.
You can use: 1. v.Character:SetPrimaryPartCFrame(CFrameValue) 2. v.Character:MoveTo(Vector3Value)
Second Error(probably the one you are struggling to remove), The loop IS SLOWED when it finds a player which is in "home" team.
Which means, it has to execute the whole script before returning to the loop. For this reason, i suggest you to use coroutines.
kappa |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 02:46 PM |
can u not totally freak out for a guy not liking ur code u guys are such sore losers |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 02:59 PM |
| Your "Code" doesn't work... |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 03:02 PM |
ffs all u have to do is change a couple of lines. Maybe you need to lean how to debug for once.
message('Time To Start The Game!',5)
for i,v in next, game.Players:GetPlayers() do if v.TeamColor == game.Teams.away.TeamColor then v.Character.Torso.CFrame = CFrame.new(92.212,1.001,-49.616) elseif v.Team == game.Teams.home.TeamColor then v.Character.Torso.CFrame = CFrame.new(-92.308,1.049,361.391) end end
wait(7) message('Here Are This Matchups Teams!',5) wait(7) message(away.Name..' Is Your Away Team!',5) workspace.awayroom.door.CanCollide = false workspace.awayroom.door.Transparency = 1 wait(10) workspace.awayroom.door.CanCollide = true workspace.awayroom.door.Transparency = 0 wait(5) message("Here Are Your "..home.Name,5) workspace.homeroom.door.CanCollide = false workspace.homeroom.door.Transparency = 1 wait(10) workspace.homeroom.door.CanCollide = true
|
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Oct 2016 03:05 PM |
| THE TEAMS AREN'T CALLED AWAY AND HOME... |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 03:07 PM |
OMG I MEANT
if v.TeamColor == away.TeamColor then
|
|
|
| Report Abuse |
|
|