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

How i can locate player in workspace?

Asked by 3 years ago
Edited 3 years ago

(sorry for my english) Get the player name from the local player dont works character.humanoid - dont works script (im using local script) also im hew in scripting

local tool = script.Parent
local Player = game.Players.LocalPlayer
local Char = Player.Character 
local leaderstats = Player.leaderstats


tool.Activated:Connect(function()
    --(here i need to get player humanoid or player in workspace)
end)
0
Is your problem is that you don't know how to make a script notice the player activate the tool?Another question is are u using a script or a local script? lamgogo 56 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

The player in workspace is the character. To get the humanoid use Char:WaitForChild("Humanoid")

0
That script won't work because the player.character isn't actually an object. You would return with an error saying that the humanoid doesn't exist. Cyrus_O4 45 — 3y
0
thats very close, but i alr made a script NotCreatoInRoblox 2 — 3y
Ad

Answer this question