Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Instance.new isn't working properly?

Asked by 3 years ago
Edited 3 years ago
game.Players.PlayerAdded:connect(function(plr)
    local ko = Instance.new("StringValue", game.Workspace.Players)
    ko.Name = plr.Name
    ko.Value = plr.Name 
end)

I would expect you to know what this does but just in case you don't it makes a new string value when a player joins and puts it in "Players" which is a folder in work space, basicly it doesn't do it, it doesn't make a string value into players, no errors show up in output.

0
Instance.new() is working perfectly. It's human error that is stopping it from doing what you want. One, Players is not in workspace unless you add something called players in workspace. Two, are you trying to make a leaderboard? If so, you need a container called leaderstats inside the player. M39a9am3R 3209 — 3y
0
One, i explained what players is, i know players is in game.players and because you did not read let me write again Players is FOLDER in workspace XxSHjokerxX 18 — 3y
0
I solved it btw, i forgot i had a while loop above this code. XxSHjokerxX 18 — 3y
0
You can't call him a script kiddie when you still use game.Workspace, you can use just "workspace" now?????? Turtletowerz 1078 — 3y
View all comments (6 more)
0
Not like it matters whether you use game.Workspace or just workspace turtle. DeveloperSolo 355 — 3y
0
Turtle Im using game.Workspace because workspace can being deprecated in future (like everything in roblox: uhh KeyDown, remove etc) so thats why I prefer using it instead of "workspace" DevKurka 173 — 3y
0
@XxSHjokerxX This is not how you ask ppl for help. User#5423 5 — 3y
0
@kingdom5 I only want people who actually understand the language to reply, now if you reply to me I'm not going to reply because this is a site for helping with scripts not to start arguements XxSHjokerxX 18 — 3y
0
Exactly, so take your words. Do not incite a flame war. Otherwise your account will be suspended. You have not started on the right track with me, capish? I just skimmed over your code. I assumed it was one of those classic person doesn't understand the Roblox system question. I apologize. That does not reserve you the right to call me a script kiddie. Regardless of the fact, you still messed up. M39a9am3R 3209 — 3y
0
You made an infinite loop wall which was never disclosed in the script you provided. I have cited these infinite loop walls in a previous blog article. https://scriptinghelpers.org/blog/common-mistakes M39a9am3R 3209 — 3y

Answer this question