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

How can this be fix?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago
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"))

Ad

Answer this question