Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Some buttons I tried to move/Destroy won't get removed?

Asked by 4 years ago

So, I tried to move/destroy those locks who are on my GUI (for people who are in the group, they will be moved/ else than that, the locks will stay.)

local Locks = script.Parent.Frame.locks
    game.Players.PlayerAdded:Connect(function(plr)
    if plr:IsInGroup(4937707) then
    Locks:Destroy()
    print("Worked")
end
end)

.. Thank you for reading

1 answer

Log in to vote
0
Answered by 4 years ago

Local script

local Locks = script.Parent.Frame.locks
if game.Players.LocalPlayer:IsInGroup(4937707) then
    Locks:Destroy()
    print("Worked")
end
Ad

Answer this question