I am creating a Group Lock System on Roblox with a button that turns it off. The button has a script that disables the group lock system in PlayerGui. However, it doesn't turn off the script. What is happening?
My current script:
script.Parent.Activated:connect(function()
local stafflock = game.ServerScriptService.Stafflock
local status = "on"
stafflock.Disabled = true
game.StarterGui:SetCore("SendNotification", {
Title = "Stafflock";
Text = "Has been turned"..status..".";
Duration = 5;
})
end)
Thanks.

4 comments
It is a local script? If it is you may need a remote event
Could you give more info,like if the script.Parent is a tool or something like that?
It is a button. And yes, it is a local script.
i updated my answer