Hello! For some reason, when a character is in a certain team, LoadCharacter does not refresh their health to their maxhealth. However, when in another team LoadCharacter does refresh their health to thier maxhealth. The health also only doesn’t refresh on the client side, the server sees the health of the character as full. How would I fix this? Also, I have checked every local script, and none of them changes the humanoid’s health.
loadCharacter just respawns the players, so yes its sets the health back to full again unless you have a script that changes that.
I have checked all of my scripts, and none of them messes with the humanoid’s health. Also, I found out that the client sometimes sees the player’s health as full the moment the player’s character loads, but after a bit it sees it as 0. I have no idea what’s going on.
Edit: I found out that the problem lies within the spawn points of the map. I have a round-based system that allows players to pick a map, and the problem only arises when the spawnpoints on the map are available. I don’t know why this happens. I also found out that the server also sees the character’s health as 0 after a while.
The short answer: Yes.
When you manually load a character, it’s the same as Roblox automatically loading the character into the workspace.
That is strange. What I usually do since in my game, the lobby and the game field are in separate places, I manually load the characters the first time then enable the spawn points so Roblox does it automatically. However, I do not know what the requirements for your game is, so I do not know if that will work for you.
i tried making multiple spawn points, and none of them killed the player even after loading the character multiple times. Yet, once I set the spawn point to the map, it started glitching again and my character would die upon loading.
can you show us the code of this
There isn’t really a code, because the problem lies with the spawn points. I have tried disabling every script, and the only script that makes a difference is the one the spawns the map. I’ve tried turning characterautoloads to true and the problem still arises.
nevermind i found out the problem i had a script that kills any character in the playing team that leaves the battle arena as a way to prevent exploiters from cheating by leaving the battle arena, and destroying a character counts as leaving the battle arena sorry for the trouble caused
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.