Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Line: 7 Error CharacterAdded is not a member of Player. why is this happening?

Here is the code, Roblox wiki says the same thing as this code I can't seem to figure it out!

local function onCharacterAdded(character)
	local Win = Instance.new("BoolValue")
	Win.Name = Win
	Win.Parent = character
end

game.Players.CharacterAdded:Connect(onCharacterAdded)

1 comment

0

This is stopping my progress in making my game because this is such an important aspect of the game (It may not seem major but trust me it is.).

1 answer

✓ Accepted answer

You'll have to specify the player themselves. I hope this helps!

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(onCharacterAdded)
end)

2 comments

0

Oh I got it all wrong

0

also you forgot the function in player.CharacterAdded:Connect(function(onCharacterAdded)

This discussion is preserved as it was. New answers, comments, and votes are closed.