Ducksneedhelp1

Delete a part - ClientScript (Local Script)

Aug 13th, 2020 (edited)
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local Delete = ReplicatedStorage:WaitForChild("Delete")
  3. local UserInputService = game:GetService("UserInputService")
  4. local part = game.Workspace.Part
  5.  
  6.  
  7. UserInputService.InputBegan:Connect(function(input)
  8.     if input.KeyCode == Enum.KeyCode.D then
  9.         print("C is Pressed, and the part is going to destroy shortly!")
  10.         Delete:FireServer(part)
  11.     end
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment