Alright, I've done this to get the player's name.
local m = game.Players.LocalPlayer:GetMouse()
local ErasureActive = game.ReplicatedStorage.ErasureActive.Value
local ttime = "ok"
m.KeyDown:connect(function(k)
k = k:lower()
if k == 'z' then
if ttime == "ok" then
local target = game.Players.LocalPlayer:GetMouse().Target
local h = target.Parent:FindFirstChild('Humanoid')
if h then
local player = print(h.Parent.Name)
local playerfind = player
end
end
end
end)
Now I'd like to get access to his PlayerGui, so I tried
game.Players{playerfind}.PlayerGui.Erasure.Z.Disabled = true
The output says:
Trying to call method on object of type: Players with incorrect arguments.
Help, please?

1 comment
Are you using remote events? Also, are you making a My Hero Academia-based game? Lol.