Disable backpack with remote event

i’m trying to disable the backpack with a remoteevent but it doesn’t seem to be working, no related errors or output of any kind happens.

Here’s the local script

local Players = game:GetService("Players")
local CoreGui = game:GetService("StarterGui") --the service
local cleetosis = game.ReplicatedStorage.cleetosisEvent

local function disableinv(plr)
		game.LocalPlayer.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
end

cleetosis.OnClientEvent:Connect(disableinv)

and this is in the main game script which runs every time someone gets “tagged” in this tag game.
cleetosis:FireClient(plr)

I believe it’s because you’re not calling the plr value. But I can’t be so sure about this…

yeah i’m not sure if it was that

You don’t need LocalPlayer there. You can just use game:GetService(“StarterGui”)

1 Like