Ducksneedhelp1

Local Script for HD application

Dec 28th, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. local Floor1Event = game.ReplicatedStorage.Floor1Event
  2. local Floor2Event = game.ReplicatedStorage.Floor2Event
  3. local Floor3Event = game.ReplicatedStorage.Floor3Event
  4.  
  5.  
  6. local ElevatorFrame = script.Parent.ElevatorFrame
  7.  
  8. local CloseButton = ElevatorFrame.CloseButton
  9. local Floor1 = ElevatorFrame.Floor1
  10. local Floor2 = ElevatorFrame.Floor2
  11. local Floor3 = ElevatorFrame.Floor3
  12.  
  13. local OpenButton = script.Parent.OpenButton
  14.  
  15. CloseButton.MouseButton1Click:Connect(function()
  16.  
  17. ElevatorFrame.Visible = false
  18. end)
  19.  
  20. OpenButton.MouseButton1Click:Connect(function()
  21.  
  22. if not ElevatorFrame.Visible == true then
  23. ElevatorFrame.Visible = true
  24. end
  25. end)
  26.  
  27. Floor1.MouseButton1Click:Connect(function()
  28. Floor1Event:FireServer()
  29. print("Firing to Server")
  30. end)
  31.  
  32. Floor2.MouseButton1Click:Connect(function()
  33. Floor2Event:FireServer()
  34. print("Firing To Server")
  35. end)
  36.  
  37. Floor3.MouseButton1Click:Connect(function()
  38. Floor3Event:FireServer()
  39. print("Firing To Server")
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment