I've created this command for an Admin Script I'm making it was working before but now it doesn't work and the only reason I haven't fixed it yet is that it isn't putting an error at all to tell me what's wrong and what's broken.
I've been trying to get it to work for ages now it doesn't output and error so that's not any help I'm not sure if lack of sleep has made me not able to see the thing wrong or what.
Here's the code:
if PlayerMessage:sub(1, 9) == "/respawn " then local TargetPlayer = game.Players:FindFirstChild(PlayerMessage:sub(10)) if TargetPlayer.Name == "Cryo_Dev" then CommandFailed() else if TargetPlayer then TargetPlayer:LoadCharacter() CommandSuccess() else CommandFailed() end end end