|
| 30 Jun 2015 12:11 PM |
The script's parent is a team. Im trying to make it so when the value is changed, the team name changes.
workspace.teamname.Changed:connect(function() script.Parent.Name=workspace.teamname.Value end) |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 30 Jun 2015 12:14 PM |
is teamname a string value?
workspace.teamname.Changed:connect(function(newValue) script.Parent.Name = newValue end)
http://wiki.roblox.com/index.php?title=API:Class/StringValue/Changed |
|
|
| Report Abuse |
|
|
baldo46
|
  |
| Joined: 28 Jul 2008 |
| Total Posts: 1254 |
|
|
| 30 Jun 2015 12:14 PM |
workspace.teamname.Changed:connect(function(prop) if prop == "Value" then script.Parent.Name = workspace.teamname[prop]; end end) |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2015 12:31 PM |
^ Didn't work.
@insta it is a string value. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 30 Jun 2015 12:43 PM |
Does the output say anything?
"Talk is cheap. Show me the code." - Linus Tivalds |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 30 Jun 2015 01:17 PM |
im assuming this is a local script?
"Talk is cheap. Show me the code." - Linus Tivalds |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 30 Jun 2015 01:20 PM |
works for me
http://prntscr.com/7n7lac
"Talk is cheap. Show me the code." - Linus Tivalds |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2015 01:21 PM |
| It's not a LocalScript. Does it have to be? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 30 Jun 2015 01:21 PM |
and here shows the value
http://prntscr.com/7n7lsn
"Talk is cheap. Show me the code." - Linus Tivalds |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2015 01:22 PM |
| ^ It has no relation to the player. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 30 Jun 2015 01:22 PM |
@milly always use local scripts with guis
"Talk is cheap. Show me the code." - Linus Tivalds |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 30 Jun 2015 01:24 PM |
Then in a regular script i put it into a model and it worked
http://prntscr.com/7n7n0q
"Talk is cheap. Show me the code." - Linus Tivalds |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2015 02:13 PM |
| It's not a gui. I want the Team's name to be equal to the teamname value. |
|
|
| Report Abuse |
|
|
vvoods
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 743 |
|
|
| 30 Jun 2015 03:41 PM |
it wont fire unless teamname changes, then it'll change to the name you want
name = workspace.TeamName
name.Changed:connect(function() name.Value = script.Parent.Name end)
=volty= |
|
|
| Report Abuse |
|
|
|
| 01 Jul 2015 10:23 AM |
| I have another script that changes teamname. |
|
|
| Report Abuse |
|
|