|
I have this script. It's in the string value.
game.Players.ChildAdded:connect(function(player)
if script.Parent.Value == nil then
print("A player has entered: " .. player.Name) -- This part works.
script.Parent.Value = player.Name -- This part doesn't work.
end
end)
It prints playerName correctly, but doesn't change the value, and if I will do it like this:
game.Players.ChildAdded:connect(function(player)
if script.Parent.Value == nil then
print(player.Name) -- This part doesn't work.
script.Parent.Value = player.Name -- This part doesn't work.
end
end)
It doesn't event print the name!!!
HOW IS IT SUPPOSED TO WORK?
Russia - [Rusha] - RUSH A!!! Russia must to RUSH A instead B..... |
|
|
Lol haha he never going to know |
|
|
What is purpose of your comment? Go ahead, if you don't know the answer.
Russia - [Rusha] - RUSH A!!! Russia must to RUSH A instead B..... |
|
|
Hahaha keep waiting shadowkid |
|
|
Put this script in ServerScriptService and use the regular script, not the LocalScript. For the love of magic man in the sky, whitespace (ident) your code
~Siggy? What is a siggy? |
|
|
It doesn't work there and I have REGUALR script...
Russia - [Rusha] - RUSH A!!! Russia must to RUSH A instead B..... |
|
|
Forget about the indentation. Adding a new makes it look it is not whitespaced.
~Siggy? What is a siggy? |
|
|
Then don't set the script's parent StringValue. Set the StringValue as the script's child.
Script then StringValue. Not StringValue and then Script
~Siggy? What is a siggy? |
|
|
Lmao get the popcorn real pro help hahahah |
|
|
Doesn't work. It looks like it's not about the value, becouse when print function has more "Deatils" print("A player has entered:" .. player.Value) it works, but when i delete this and just set print(player.Name) or print(player) it doesn't print anything...
Thank you for tryinhg to help...
Russia - [Rusha] - RUSH A!!! Russia must to RUSH A instead B..... |
|
|
Kid, just hek off. No-one cares on you.
Russia - [Rusha] - RUSH A!!! Russia must to RUSH A instead B..... |
|
SurKipperJoin Date: 2011-12-25 Post Count: 436 |
Do you want it to keep working when more players enter or do you just want it to run the first time? and also I used this script and it works perfectly ServerScriptService >>Script >>>>StringValue ----- game.Players.PlayerAdded:connect(function(player) if ######################## ## '' then print(player.Name) script.StringValue.Value = player.Name end end) |
|
SurKipperJoin Date: 2011-12-25 Post Count: 436 |
game.Players.PlayerAdded:connect(function(player) if ######################## ## '' then print(player.Name) script.StringValue.Value = player.Name end end) |
|
SurKipperJoin Date: 2011-12-25 Post Count: 436 |
in a script that has a StringValue named StringValue game.Players.PlayerAdded:connect(function(player) if ######################## ## '' then print(player.Name) script.StringValue.Value = player.Name end end) |
|