I need some help with a ui button when click disabled a script

If u haven’t read the title already, i need help with something with making a ui button that disabled a script, i have done alot of research but most of the time i cant find anything about my topic and i hope u guys can give me some ideas on how to scriot the ui button like how i said above

local scriptToDisable = --replace with script path
local button = --replace with button path

button.MouseButton1Down:Connect(function()
script.Disabled = true
end)
1 Like

Hmm i will try it and i will reply back too u soon!

Also what type of script i need local script or a normal one?

Depends on what you want to do, if you want it to disable a script on the client then use the one I gave you in a LocalScript, if you want it to disable on the server then you need to hook it up to a RemoteFunction

1 Like

Ok thank you for ur help i will definitely try the script

If it worked I’d appreciate if you marked the script as the solution :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.