Value is not a valid member of Part "Workspace.DevFoll.Uzi.Ammo"

Hey i’m DevFoll and i don’t understand how my script doesn’t work i perfectly spelled the name right and added value at the end. My script:

local Mouse = game.Players.LocalPlayer:GetMouse()
script.Parent.Equipped:Connect(function()
	Equipped = true
	Mouse.Button1Down:Connect(function()
		ButtonDown = true
		while ButtonDown == true and Equipped == true and script.Parent.Ammo.Value > 0 do
	script.Parent.RemoteEvents.Fire:FireServer(Mouse.Hit.Position)
			wait(0.1)
				
		end
		if script.Parent.Ammo.Value <= 0 then
			script.Parent.RemoteEvents.OutOfAmmo:FireServer()
		end
		ButtonDown = false
	end)
end)
Mouse.Button1Up:Connect(function()
	ButtonDown = false
end)

script.Parent.Unequipped:Connect(function()
	Equipped = false
end)

Pic of tool:
image

It looks like you have a Part named Ammo too and the game is finding that one first. Rename one of them and give it a unique name.

Forgot about that hehe (maxChar)

As mentioned above, if you have two objects with the same name that are both direct children of another object, they will conflict and you won’t really know which the script will access. In your particular case, the scripts sees “Ammo” as the part.

my script is not in a folder. 11

i know (maxCharsssssssssssssss)