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

How i can locate player in workspace?

(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)

1 comment

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?

1 answer

✓ Accepted answer

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

2 comments

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.

0

thats very close, but i alr made a script

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