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

How do i make it so a local script waits for a specific player and then does something to them?

Asked by 7 years ago

I'm trying to make custom abilities for certain people but I don't know how to do this, please help

3 answers

Log in to vote
1
Answered by 7 years ago
game.Players:WaitForChild("PlayerName")
Ad
Log in to vote
0
Answered by
aiuis 85
7 years ago

Local script in StarterGui / StarterPlayer.StarterPlayersScripts / StarterPack ...

game.Players.LocalPlayer.CharacterAdded:Connect(function(Character)
    if Character.Name=='SwordsDestinyGames'or'name2'or'name3'then
        Character.Humanoid.WalkSpeed=100 -- example
    end
end)

0
Thanks alot! SwordsDestinyGames -11 — 7y
Log in to vote
0
Answered by 7 years ago
local player = game.Players.LocalPlayer
local char = player.Character or CharacterAdded:wait()

Answer this question