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
 

Re: Punch script

Previous Thread :: Next Thread 
iAnemoii is not online. iAnemoii
Joined: 15 Dec 2012
Total Posts: 37
22 Jun 2017 02:17 PM
local enabled = true
Player = game.Players.LocalPlayer
me = Player
mouse = Player:GetMouse()
punch = script:WaitForChild("Punch")
local color1 = Color3.new(255,0,0)
local color2 = Co####################################################ot enabled then return end
enabled = false
local Key = key:lower()



if key == "q" then
local punchTrack = me.Character.Humanoid:LoadAnimation(punch)
punchTrack:Play()
local x = Instance.new("Part")
x.Size = Vector3.new(1,1,1)
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Name = Player.Name
x.Shape = "Ball"
x.CanCollide = false
x.Anchored = true
x.Transparency = 1
x.Parent = workspace

x.Touched:connect(function(lol)
if lol.Parent.Parent ~= nil and lol.Parent.Parent ~= nil then
if lol.Parent.Name ~= me.Name and lol.Parent.Parent.Name ~= me.Name then
lol.Parent.HumanoidRootPart.Velocity = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector* 0
lol.Parent.Humanoid:TakeDamage(2)
end
end
end)
game.Debris:AddItem(x, 0)
x.Anchored = false
local y = Instance.new("BodyVelocity")
y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
y.velocity = Player.Character.HumanoidRootPart.CFrame.lookVector*0
y.Parent = x
x.CFrame = Player.Character.HumanoidRootPart.CFrame*CFrame.new(1.5, 1.5, -1.5)
wait()
end
wait(.3)
enabled = true
end




mouse.KeyDown:connect(onKeyDown)


This is a punch script for a game that I was making. The damaging works just fine, however the animation wont show up when I press Q. Can anyone tell me how to fix?


Report Abuse
G_FX is not online. G_FX
Joined: 29 Jan 2011
Total Posts: 132
22 Jun 2017 02:35 PM
do you own the animation
Report Abuse
iAnemoii is not online. iAnemoii
Joined: 15 Dec 2012
Total Posts: 37
22 Jun 2017 02:36 PM
No, its an animtion my friend made.


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