I'm trying to print the players name but it isn't working and I can't figure out where the error is?
local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
local Active = false
script.Parent.Activated:Connect(function()
if Active == false then
Active = true
animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Parent.Animation)
animation:Play()
animation.Stopped:Wait()
print(player.Name)
wait(1)
Active = false
end
end)
script.Parent.Unequipped:Connect(function()
animation:Stop()
end)

3 comments
Everything else works fine but the script breaks when I add print(player.Name)
Do you get any errors in the output? Print just player instead of player.name and see what happens.
When I do print("player") it prints "nil"