Advertisement
Sungmingamerpro13

ExitButton(LocalScript)

Jan 2nd, 2023 (edited)
1,764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.32 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local LeaveGuiEvent = ReplicatedStorage:WaitForChild("LeaveGuiEvent")
  3.  
  4. local player = game.Players.LocalPlayer
  5.  
  6. script.Parent.ExitButton.MouseButton1Click:Connect(function()
  7.     LeaveGuiEvent:FireServer(player)
  8.     script.Parent.ExitButton.Visible = false
  9. end)
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement