Hello!
I'm trying to disable the weapons in a player's backpack while inside the lobby. But I'm having a bit of trouble with that. I've tried a couple of different scripts, without much luck. I've tried to do this by putting a giant invisible block inside my Lobby and inserting a local script to where if the player is touching the block, their backpack will be disabled.
This is my most recent scripting attempt:
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local torso = char:WaitForChild('Torso')
torso.Touched:connect(function(hit)
local human = hit.Parent:FindFirstChild('Humanoid')
if human.Parent.Name == 'BackpackChanger' then --the name of the block inside the Lobby.
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
end
end)
Am I going about this the right way, or is there a better method? Thanks!

2 comments
This code won't work. Did you even test it?
:) Thank you for the suggestion, but my game is not team-based, it wouldn't work for this game I don't think. My game is a "deathmatch" type of game. Players start in the Lobby, then teleport to the stage.