Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why wont this work?

Asked by
NotSoNorm 777 Moderation Voter
9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

This doesn't insert the boolvalue into the character when they join, what's wrong?

char = script.Parent.Parent.Parent.Parent.Character
game.Players.PlayerAdded:connect(function(player)
Instance.new(("BoolValue"),script.Parent.Parent.Parent.Parent.Character)
script.Parent.Parent.Parent.Parent.Character.Value.Name = "AFK"
end)

It's 11PM excuse me if I don't explain crap right

2 answers

Log in to vote
1
Answered by
KoreanBBQ 301 Moderation Voter
9 years ago
game.Players.PlayerAdded:connect(function(player)
local afk=Instance.new("BoolValue")
afk.Parent=player
afk.Name="AFK"
end)

Ad
Log in to vote
0
Answered by 9 years ago

Your doing it the other way, how alot of people just got it from teleport GUI models or something. Insert in with the value.Parent equal the player. That was a easy error, but I hope this helps.

--Because you have that function, you'd use "player" instead.
valuename.Parent = player

Answer this question