Hello, the lost people,
I need help with getting a player from the local function
. I tried a different way to fix it but still didn’t work. Please help me.
Code
local function attack(part)
if game.Players:FindFirstChild(part.Parent.Name) then
local player = game.Players:FindFirstChild(part.Parent.Name)
if attacking == false then
attacking = true
local calledPlayer = game:GetService("Players"):GetPlayerFromCharacter(part.Parent)
if calledPlayer then
events:WaitForChild("playerDeath"):FireClient(killer, calledPlayer)
end
end
end
end