generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Anyway I could make this R15 compatible?

Previous Thread :: Next Thread 
kaloyanthegreater is not online. kaloyanthegreater
Joined: 06 May 2012
Total Posts: 5174
30 Apr 2017 08:11 AM
This keydown script for animation doesn't work for R15 animations.Any way to make it compatible?
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local punchSound = script:WaitForChild("PunchS")
local punchS = punchSound:Clone()
local punch = script:WaitForChild("Punch")
local kick = script:WaitForChild("Kick")
local trips = script:WaitForChild("TripS")
repeat wait() until player.Character
local char = player.Character
local humanoid = char:WaitForChild("Humanoid")
punchS.Parent = char:WaitForChild("Torso")
local enabled = true

--Changeable--
local kickdamage = 30
local punchdamage = 15
local kickcooldown = 0.3
local punchcooldown = 0.1
--------------

mouse.KeyDown:connect(function(key)
if key:lower() == "q" and humanoid and enabled then
enabled = false
humanoid:LoadAnimation(kick):Play()
punchS:Play()
local ra### #a############################har.Head.CFrame.lookVector * 4)
local hit = game.Workspace:FindPartOnRayWithIgnoreList(ray, {char.Torso, char["Left Arm"], char["Right Arm"]})
if hit then
if hit.Name == "Torso" or hit.Name == "Left Arm" or hit.Name == "Right Arm" then
local targethumanoid = hit.Parent:FindFirstChild("Humanoid")
if targethumanoid then
targethumanoid:TakeDamage(kickdamage)
trips:Clone()
trips.Parent = targethumanoid
trips.Disabled = false
end
end
end
wait(kickcooldown)
enabled = true
elseif key:lower() == "e" and humanoid and enabled then
enabled = false
humanoid:LoadAnimation(punch):Play()
punchS:Play()
local ra### #a############################har.Head.CFrame.lookVector * 4)
local hit = game.Workspace:FindPartOnRayWithIgnoreList(ray, {char.Torso, char["Left Arm"], char["Right Arm"]})
if hit then
if hit.Name == "Torso" or hit.Name == "Left Arm" or hit.Name == "Right Arm" then
local targethumanoid = hit.Parent:FindFirstChild("Humanoid")
if targethumanoid then
targethumanoid:TakeDamage(punchdamage)
end
end
end
wait(punchcooldown)
enabled = true
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image