Script works fine in studio, not so much published!

  • 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 newEquip
    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


  • @DommeKatrina This might be off topic, but have you tried using EquipTool before to equip the tools?

  • It looks like filtering may be the issue. Studio doesn't do filtering simulation, unless you use local servers. Is FE enabled?

Log in to reply

Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.