Advertisement
Joriangames

RAGDOLL Pressing KEY in Roblox Studio. LOCALSCRIPT

Feb 7th, 2024
2,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. -- RAGDOLL with PRESSING KEY by BLOXIANCODE youtube.com/c/BloxianCode
  2. -- Tutorial: https://youtu.be/zycVpt-ClEQ
  3.  
  4. local UIS = game:GetService("UserInputService")
  5. local RepStor = game.ReplicatedStorage
  6. local isRagdoll = false
  7.  
  8. UIS.InputBegan:Connect(function(key, inChat)
  9.     if inChat then return end
  10.     if key.KeyCode == Enum.KeyCode.R then --if player pressed R
  11.         if not isRagdoll then
  12.             RepStor.RagdollEvent:FireServer("go")
  13.             wait(.5)
  14.             isRagdoll = true
  15.         else
  16.             RepStor.RagdollEvent:FireServer("stop")
  17.             wait(.5)
  18.             isRagdoll = false
  19.         end
  20.     end
  21. end)
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement