HowToRoblox

DetectFireball

Jul 29th, 2021 (edited)
1,859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. local re = game.ReplicatedStorage:WaitForChild("OnFireballThrown")
  2.  
  3.  
  4. local mouse = game.Players.LocalPlayer:GetMouse()
  5.  
  6.  
  7. local uis = game:GetService("UserInputService")
  8.  
  9.  
  10.  
  11. uis.InputBegan:Connect(function(inp, processed)
  12.    
  13.     if processed then return end
  14.    
  15.    
  16.     if inp.KeyCode == Enum.KeyCode.G then
  17.        
  18.        
  19.         re:FireServer(mouse.Hit)
  20.     end
  21. end)
Add Comment
Please, Sign In to add comment