|
| 04 Jun 2015 02:29 PM |
while true do game.Teams.Home.Name = game.Workspace.HomeTeam.Value game.Teams.Away.Name = game.Workspace.AwayTeam.Value end |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2015 02:30 PM |
what are you trying to do? also that crashes the game.
plug the batteries back in |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2015 02:32 PM |
| I know. But I need a looping script. That will change the name of team. So you have your default team Home and I need to rename it to what ever is the HomeTeam value |
|
|
| Report Abuse |
|
|
UgOsMiLy
|
  |
| Joined: 15 Sep 2009 |
| Total Posts: 2095 |
|
|
| 04 Jun 2015 02:32 PM |
| It'd crash the game. There is no wait() |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2015 02:34 PM |
| LMAO im dumb i forgot da wait it works now |
|
|
| Report Abuse |
|
|
UgOsMiLy
|
  |
| Joined: 15 Sep 2009 |
| Total Posts: 2095 |
|
|
| 04 Jun 2015 02:34 PM |
while wait(5) do game.Teams.Home.Name = game.Workspace.HomeTeam.Value game.Teams.Away.Name = game.Workspace.AwayTeam.Value end
--Changes the name of the team every 5 seconds |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2015 02:34 PM |
instead of using a loop, use the changed() event that fires whenever a property is changed, so when the value changes make the name = the value. http://wiki.roblox.com/index.php?title=API:Class/Instance/Changed
plug the batteries back in |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 04 Jun 2015 02:35 PM |
local HomeTeam = game:GetService("Teams"):WaitForChild("Home") local AwayTeam = game:GetService("Teams"):WaitForChild("Away")
local Home = workspace:WaitForChild("HomeTeam") local Away = workspace:WaitForChild("AwayTeam")
while true do wait(0.5) HomeTeam.Name = Home.Value AwayTeam.Name = Away.Value end
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2015 02:38 PM |
function editPoints() HomeTeam.Name = Home.Value AwayTeam.Name = Away.Value end Home.Changed:connect(editPoints) Away.Changed:connect(editPoints)
much more efficient than a loop
plug the batteries back in |
|
|
| Report Abuse |
|
|