Even though the IP and password are right, and the server is on, I can’t connect it through my public IP. I can only connect it through 127.0.0.1. Why?
Port is nor forwarded or your router does not support this.
Never do that as the host, when it is possible for you to connect via localhost or LAN.
Port is forwarded and my router supports this. I can’t connect via localhost or LAN due to handware problems. (I can play minecraft with my own server)
Did you opened the port in your firewall?
Try just using “localhost” to connect and leave the IP in the config as default 0.0.0.0
Do you have an IPv4 and an IPv6 address?
You can test this here: https://www.whatismyip.com/
If you have both addresses, you may need to connect to your IPv6 address, as it is probably a dual-stack lite connection and therefore your IPv4 address is shared with other households and therefore not accessible from the outside.
Then you could either make your TeamSpeak server IPv6 accessible or ask your ISP to switch to native dual-stack.