Advertisement
InTesting

Test 1

Jan 9th, 2019
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local RemoteEvent = nil -- Locate your remote event.
  2.  
  3. function playAnim(obj_playerModel,numValue_AnimIdNoURL)
  4. local anim = Instance.new("Animation")
  5. anim.AnimationID = numValue_AnimIdNoURL
  6. local loadAnim = obj_playerModel.Humanoid:LoadAnimation(anim)
  7. loadAnim:Play()
  8. end
  9.  
  10. function stopAnim(obj_playerModel,numValue_anyAnimIdNoURL)
  11. local anim = Instance.new("Animation")
  12. anim.AnimationID = numValue_anyAnimIdNoURL
  13. local loadAnim = obj_playerModel.Humanoid:LoadAnimation(anim)
  14. loadAnim:Stop()
  15. end
  16.  
  17. -- function cant execute
  18. -- write like this and replace the stuff in the parenthesis without removing the comma
  19.  
  20. RemoteEvent.OnServerEvent:Connect(function(name,ID)
  21. playAnim(game.Players[name].Character.Humanoid,ID)
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement