How do i access a players starter Gui if their damaged

Hello i’m making a game with combat. I have damage, timing, combos, and hit animations down but i don’t know how to make it so when i’m punching they cant punch back. And my game doesn’t only have punching it has other abilities as well. When a person is getting hit i want them to get stunned. I know how to set their walk speed and jump Power to 0 but they can still just press q and attack me during a combo or a move. I want to know how to access their starter GUI to change this. I have a bool value called “Global Cd” and this value allows me not to do multiple moves at once because when i activate a move the value is set to true and every other ability test for the value to be false before activating their move. Is their a way when i hit a player, i can access their starter GUI through the hit and change that value to true for 2 seconds so they are essentially stunned…?

StarterGui is actually only a container, that stores what loads into PlayerGui, when the character is spawned. When the player character is loaded, everything inside of StarterGui, gets copied into PlayerGui, making it specific to each player.

Therefore, to access a value that originated in StarterGui, you must look for it inside PlayerGui. For example, if you have a bool value placed directly inside of StarterGui, you can access it in game like so:

game.Players.LocalPlayer.PlayerGui.BoolValue

Just a heads up, though, that PlayerGui is only accessible from the client. If you need to use the BoolValue from the Server, I recommend you Parent it somewhere else( such as the character itself ).

Hope this is helpful!

Yes! this is what i was looking for thank you so much