I was trying to fix a bug where when the player dies, they can’t move, startergui core guis get disabled AND screen guis inside StarterGui don’t get enabled.
I have already fixed startergui core guis and the error where they can’t move, the only thing i’m missing to fix is HOW :FireServer() is not working in a script and the LocalScript should be detecting it normally but instead it doesn’t enable or go through anything
I’ll put the Script that detects when u die (OnDeath) and the LocalScript that is supposed to enable the GUIs on a remote event call (Communication) (by the way the LocalScript is in PlayerGui if that causes any visible errors)
OnDeath:
repeat task.wait() until script.Parent:FindFirstChild("Humanoid") and script.Parent:FindFirstChild("Head")
while true do
wait(0.1)
local player:Player = game.Players:WaitForChild(script.Parent.Name)
player.Character:WaitForChild("Humanoid").Died:Connect(function()
task.wait(6)
for i=1,10 do
game.ReplicatedStorage.FixUI:FireClient(player)
task.wait()
end
player.Character.Humanoid.WalkSpeed = 14
task.wait(1)
for i=1,15 do
game:GetService("ReplicatedStorage"):WaitForChild("Server_Client_Communication"):WaitForChild("FireFixUI"):FireClient(player)
task.wait()
end
task.wait(0.5)
local ui = player:WaitForChild("PlayerGui")
ui.RakeHealth.Enabled = true
ui.StaminaV23.Enabled = true
game.Players.LocalPlayer.Character.view.Enabled = true
ui.ThingXD.TextButton.Visible = true
ui.GetBomboclatedFov.Enabled = true
ui.RakeHealth.Enabled = true
ui.GameInfo.Enabled = true
ui.GameInfo.Version.Visible = true
warn("respawned test FIX ALL")
ui.RakeHealth.Enabled = true
ui.StaminaV23.Enabled = true
game.Players.LocalPlayer.Character.view.Enabled = true
ui.ThingXD.TextButton.Visible = true
ui.GetBomboclatedFov.Enabled = true
ui.RakeHealth.Enabled = true
ui.GameInfo.Enabled = true
ui.GameInfo.Version.Visible = true
warn("respawned test FIX ALL")
end)
end
Communication:
local comfolder = game:GetService("ReplicatedStorage"):WaitForChild("Server_Client_Communication")
local fixUI = comfolder:WaitForChild("FireFixUI")
local uis = {
"StaminaV23",
"RakeHealth",
"GameInfo",
"BHServerGui",
"BloodHourScreen",
"DarkseedExpl",
"DeathScreen",
"EerieExplosion",
"NHServerGUI",
"NVGOverlay",
"PowerMalfunctioning",
"StationSystemUI",
"RUN"
}
local arguments = {
["UI"] = {
["func"] = function()
for _, Name in pairs(uis) do
for __, UI in ipairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
if UI:IsA("ScreenGui") then
if UI.Name == Name then
UI.Enabled = true
print(UI.Name)
print(UI.Enabled)
end
end
end
end
local PG = game.StarterGui -- // since this is client it should only be for player
PG:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
PG:SetCoreGuiEnabled(Enum.CoreGuiType.Health, true)
PG:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
PG:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
end;
["remote"] = fixUI
};
}
fixUI.OnClientEvent:Connect(arguments["UI"]["func"])
I don’t know if its OnClientEvent that is failing but it seems to communication not working (i also tried to enable the GUIs through the OnDeath script and resulted on failing again)