Why is this sound not playing?

I feel like when I get the answer, it’s going to be extremely obvious. So I have this tool called Banana bc it’s a banana and I have the following things inside of it:
image
It seems easy enough, and I have created a tool before. Now I have this script in the script shown in the picture, and it doesn’t seem to be working. Can somebody explain why?

The Script
game.Players.PlayerAdded:Connect(function(player)
	 local tool = script.Parent
	 local sound = script.Parent.Sound
	
	tool.Activated:Connect(function()
		print("Sound will start playing")
		sound.Playing=true
	end)
end)

Sound.Playing cannot be set, use sound:play() instead.

replace sound.Playing=true with sound:Play()

@Wxeeknd @RiccoMiller That didn’t fix it. I can’t apparently share the file bc it’s too big

game.Players.PlayerAdded:Connect(function(player)
	 local tool = script.Parent
	 local sound = script.Parent.Sound
	
	tool.Activated:Connect(function()
		print("Sound will start playing")
		sound:Play()
	end)
end)
	 local tool = script.Parent
	 local sound = script.Parent.Sound
	
	tool.Activated:Connect(function()
		sound:Play()
	end)

Try using this in a local script

What’s with the game.Players.PlayerAdded:Connect(function(player)?

You don’t need it in this script I believe.

@Messeras I was going to have an animation play on the character too, but then it didn’t work so I wanted to make sure this worked first.

Alright so apparently it doesn’t play when surrounded in PlayerAdded. Why would that be?

PlayerAdded will run only once and it is when the player is added to the game

thats probably the issue

Alright I see what you mean with the fact that it only runs once.

Just change the script for a local script and
put the code without the PlayerAdded that will work for sure

The tool doesn’t need PlayerAdded anyway, if you want to play the animation on the character you can just check for the humanoid in Tool.Parent