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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Anyone wanna take a crack at it

Previous Thread :: Next Thread 
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
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
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
04 Jun 2015 02:30 PM
what are you trying to do? also that crashes the game.


plug the batteries back in
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
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 is not online. 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
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
04 Jun 2015 02:34 PM
LMAO im dumb i forgot da wait it works now
Report Abuse
UgOsMiLy is not online. 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
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
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 is not online. 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
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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