GUI to disappear in private servers

I’m trying to hide a mod call UI in private servers, but unfortunately, it continues to show up. I’m not sure what might be incorrect with the script. Scripting isn’t my thing and I’m not the best with it. Any assistance would be appreciated.

local remoteEvent = game.ReplicatedStorage.privateServerCheck

remoteEvent.OnClientEvent:Connect(function()
	local gui = game.Players.LocalPlayer.PlayerGui.modCall
	gui.Enabled = false
end)
1 Like

Could you provide the server script?

there is no need for any server/remote interference, delete those and modify the localscript:

if game.PrivateServerId ~= "" and game.PrivateServerOwnerId ~= 0 then --check if this is a private server
   game.Players.LocalPlayer.PlayerGui:WaitForChild("modCall").Enabled = false
end
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.