I have this script i made. it's supposed to allow you to choose a weapon, and click start. it will automatically equip that weapon and close the gui after you press start.
this works fine in studio... yet it won't close the gui after it's published!
local equipping = script.Parent.Parent.Equipping.Value
local storage = game.ServerStorage
local player = game.Players.LocalPlayer
local plr = player.Name
player.CameraMode = "LockFirstPerson"
for a, b in pairs (storage:GetChildren()) do
if b.ClassName == "Tool" and b.Name == tostring(equipping) then
newEquip = b:Clone()
newEquip.Parent = player.Character
script.Parent.Parent.Enabled = false
script.Parent.Modal = false
game.Workspace.onPlayerEntered.Disabled = false
--local ec = script.Parent.Parent:Clone()
--ec.Enabled = false
--ec.Parent = game.StarterGui