HowToRoblox

DetectFireball

Jul 29th, 2021 (edited)
1,092
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data