local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
local UI = plr.PlayerGui:WaitForChild("UI")
UI.Button.MouseButton1Down:Connect(function()
print("yepee!")
end)
end)
For years I thought the script above was impossible to do, given that the script is a Server Script running on ServerScriptService.
Curiosity killed the cat and while I was working on something I decided to test it for fun, assuming it will not work. To my surprise it did!
This is confusing me, as I always thought the only way to detect UI changes was with a LocalScript and a Remote Event. However, the above script works without any of that.
Is it safe to use the above script? Or is it just something else that is commonly labeled as “Unsafe” and ect? Can I trust the UI that the server is referencing?
I am more so confused on the how it works. Because based on my knowledge, it shouldn’t.