Advertisement
HowToRoblox

GameClient

Feb 7th, 2023
1,371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. --RIGHT CLICK TO TRANSFORM
  2.  
  3. local transformRE = game.ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("Transform")
  4.  
  5. local mouse = game.Players.LocalPlayer:GetMouse()
  6.  
  7. local cam = workspace.CurrentCamera
  8.  
  9.  
  10. mouse.Button2Up:Connect(function()
  11.    
  12.     local target = mouse.Target
  13.    
  14.     if target then
  15.         repeat target = target.Parent until target:IsA("Model") or target == workspace
  16.        
  17.         if target:FindFirstChild("PROP") then
  18.             transformRE:FireServer(target)
  19.         end
  20.     end
  21. end)
  22.  
  23.  
  24. --STATUS GUI
  25.  
  26. local statusVal = game.ReplicatedStorage:WaitForChild("GAME STATUS")
  27.  
  28. function updateStatus()
  29.     script.Parent:WaitForChild("StatusTextLabel").Text = statusVal.Value
  30. end
  31.  
  32. updateStatus()
  33. statusVal:GetPropertyChangedSignal("Value"):Connect(updateStatus)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement