Advertisement
eea

Untitled

eea
Sep 11th, 2021
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. local remote = Instance.new("RemoteEvent",game.ReplicatedStorage)
  2. remote.Name = owner.Name
  3.  
  4. NLS([[
  5. local players = game:GetService("Players")
  6. local player = players.LocalPlayer
  7. local mouse = player:GetMouse()
  8. local character = player.Character
  9. local root = character:WaitForChild("HumanoidRootPart")
  10. local remote = game.ReplicatedStorage:FindFirstChild(owner.Name)
  11. local terrain = workspace.Terrain
  12.  
  13. mouse.Button1Down:Connect(function()
  14. if remote then
  15. remote:FireServer(mouse.Hit.Position,1)
  16. end
  17. end)
  18.  
  19. mouse.Button2Down:Connect(function)
  20. if remote then
  21. remote:FireServer(mouse.Hit.Position,0)
  22. end
  23. end)
  24. ]], owner.Character)
  25.  
  26. game.ReplicatedStorage:FindFirstChild(owner.Name).OnServerEvent:Connect(function(player, mousepos,d)
  27. print("Server Fired.")
  28. if d == 1 then
  29. print(mousepos)
  30. --vector3 center, number radius and enum material
  31. workspace.Terrain:FillBall(mousepos, 10, Enum.Material.Grass)
  32. end
  33.  
  34. if d == 0 then
  35. --vector3 center, number radius and enum material
  36. workspace.Terrain:FillBall(mousepos,11,Enum.Material.Air)
  37. end
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement