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

How can this be fix?

This is suppose to detect the player name

local script = script:WaitForChild("Skillgiver")


function onPlayerEntered(player)
	repeat wait () until player.Character
	check = findFirstChild("Revenant101")
	if check then
	local new_script = script.Skillgiver:clone()
	new_script.Parent = player.Character
	new_script.Disabled = false
	end
 

game.Players.PlayerAdded:connect(onPlayerEntered)
onPlayerEntered(game.Players:WaitForChild("Player1"))

1 answer

✓ Accepted answer
local script = script:WaitForChild("Skillgiver")


function onPlayerEntered(player)
    repeat wait () until player.Character
    if player.Name == "Revenant101" then
    local new_script = script.Skillgiver:clone()
    new_script.Parent = player.Character
    new_script.Disabled = false
    end


game.Players.PlayerAdded:connect(onPlayerEntered)
onPlayerEntered(game.Players:WaitForChild("Player1"))

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