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: Punching hitbox

Previous Thread :: Next Thread 
NicoTheNarwhal is not online. NicoTheNarwhal
Joined: 04 Mar 2015
Total Posts: 17
09 Oct 2017 03:49 AM
In my game I made a punching script and it is really hard to land a hit but I don't know how to make the hit box larger. Any help please?
Report Abuse
guagiguagua is not online. guagiguagua
Joined: 15 Dec 2016
Total Posts: 206
09 Oct 2017 03:52 AM
i have no idea what kind of script you use to test hit
Report Abuse
NicoTheNarwhal is not online. NicoTheNarwhal
Joined: 04 Mar 2015
Total Posts: 17
09 Oct 2017 03:58 AM
CanDamage = script.CanDamage.Value
player = script.Parent.Parent
character = player.Character
Mouse = player:GetMouse()
local Humanoid = character.Humanoid
local animation = script.PunchAnimation
CanDamage = false
local Player = game.Players.LocalPlayer


Mouse.KeyDown:connect(function(Key)
if Key == "q" then
local Humanoid = character.Humanoid
CanDamage = true
local animTrack = Humanoid:LoadAnimation(animation)
local touchedConnection = character.RightHand.Touched:connect(onTouch)
animTrack:Play()
wait(0.1)
CanDamage = false
end
end)

function onTouch(part)
if CanDamage == true then
if part.Parent:FindFirstChild("Humanoid") then
local humanoid = part.Parent:FindFirstChild("Humanoid")
humanoid:TakeDamage(5+(character.Str.Value))
end
end
end


Sorry if the script is not very good Im a beginner
Report Abuse
guagiguagua is not online. guagiguagua
Joined: 15 Dec 2016
Total Posts: 206
09 Oct 2017 04:00 AM
theres a variable called touched connection that is nowhere used in the rest of the script
Report Abuse
guagiguagua is not online. guagiguagua
Joined: 15 Dec 2016
Total Posts: 206
09 Oct 2017 04:07 AM
so it works, ok, but i think because the hands are like ###### or something and they have a false can collide, they're actualy position is somewhere else? like say humanoid hip height, i dont know any way to do it so...
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