So the issue comes in when I'm trying to store the player into a variable. But for some reason when I go to check that variable immediately after I set it, I get the error that "PlayerGui is not a valid member of Model" which seems odd because if I recall correctly, it's supposed to return the player, not the player's character. Maybe there's something I'm missing. Here's the troublesome piece of code.
if game:GetService("Players"):GetPlayerFromCharacter(targetedCharacter):IsA("Player") then
print("This is a player")
local plrCheck = game:GetService("Players"):GetPlayerFromCharacter(targetedCharacter)
if not plrCheck.PlayerGui:FindFirstChild("CursedGui") then

4 comments
Can you make more detailed script?
Remember that when you make a gui in starter gui. The location of the gui moves from starter gui to players.localplayer
The entire script is over 400 lines long and this is specifically where the issue comes in at. There's no outside code that interacts with it aside from the targeted character, which can only ever be a character model.
The server can see any Gui's that are moved from starterGui and it's not a Gui that's the error. It's the player variable itself that seems to have gone wrong.