Tool Animation Will Not Play When Clicked

Attempting to make a tool for an up and coming simulator I am working on (Following a scripting series)

My tool’s animation won’t play once clicked.

Tried looking around for some solutions, couldn’t find any.

My Error: [11:19:27.209 - Player is not a valid member of DataModel “Advanced Scripting”]

local player = game.Player.LocalPlayer

script.Parent.Activated:Connect(function()
	if player.Debounce.Value == false then
		game.ReplicatedStorage.RemoteEvents.Power:FireServer(script.Parent.Values)
		
		local action = script.Parent.Parent.Humanoid:LoadAnimation(script.Animation)
		
		action:Play()
	end
end)

Help is needed! Thanks in advance! :heart:

U defined a player on wrong way, the bst way to do it is:

local player = game:GetService("Players").LocalPlayer
4 Likes