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

How would I make a code only happen to a certain player as they join?

game.Workspace.ChildAdded:connect(function(character)
 if game.Players:GetPlayerFromCharacter(character)~= nil then
    if character.Parent == "marioet77" then
        character.Head.Transparency = 1
    end
 end  
end)

How would I get a certain player's character to get this code then other players?? I'm new to characteradded

1 comment

1 answer

✓ Accepted answer

If you only want to do this when a certain person joins, use this:

game.Players.PlayerAdded:Connect(function(player)
 	player.CharacterAdded:Connect(function()
		if player.Name == "name" then -- Change name to the player's name
			player.Character:WaitForChild("Head").Transparency = 1
		end
	end) 
end)

Cheers. Accept this if it helps you.

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